A bug in my code
bearophile
bearophileHUGS at lycos.com
Sun Sep 7 16:33:33 PDT 2008
Jarrett Billingsley:
> There's no way to do it with any heap-allocated value, which does seem
> a bit like a hole to me.
I think there's both a syntax problem (what syntax to use?), and the fact that when possible D wants to avoid programming mistakes, so it wants to initialize memory to a clean state (this is even more important for the GC).
A first possible syntax?
auto a = new int[10] = void;
That syntax is also usable to replace this:
auto a = new int[10];
a[] = 5;
With:
auto a = new int[10] = 5;
But maybe this isn't important enough.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list