Vladimir Panteleev wrote:
I don't know why it was decided to mark the contents of void[] as "might have pointers". It makes no sense! Consider:
[...]
3) It's very rare in practice that the only pointer to your object (which you still plan to access later) to be stored in a void[]-allocated array!
Rare or common, it still would be a nasty bug lurking to catch someone. The default behavior in D should be to be correct code. Doing potentially unsafe things to improve performance should require extra effort - in this case it would be either using the gc function to mark the memory as not containing pointers, or storing them as ubyte[] instead.