Why are void[] contents marked as having pointers?
bearophile
bearophileHUGS at lycos.com
Sun May 31 15:34:21 PDT 2009
Vladimir Panteleev:
> Consider this really basic example of file concatenation:
> auto data = read("file1") ~ read("file2"); // oops! void[] concatenation - minefield created
I think a better design for that read() function is to return ubyte[].
I have never understood why it returns a void[].
To manage generic data ubyte is better than void[] in your program (sometimes uint[] is useful to increase efficiency compared to ubyte[]).
Bye,
bearophile
More information about the Digitalmars-d
mailing list