Null references redux

Walter Bright newshound1 at digitalmars.com
Sat Sep 26 23:50:38 PDT 2009


Jeremie Pelletier wrote:
> It could even be used for any type, the default initializer in D is a 
> cute idea, but not a performance friendly one. I would much prefer the 
> compiler to allow "int a" but warn me if I use it before assigning 
> anything to it than assigning it to zero, and then assigning it to the 
> value I wanted. "= void" is nice but I'm pretty sure I'm way over a 
> thousand uses of it so far.

The compiler, when -O is used, should remove nearly all the redundant 
initializations.



More information about the Digitalmars-d mailing list