Null references (oh no, not again!)

Walter Bright newshound1 at digitalmars.com
Wed Mar 4 14:43:44 PST 2009


Andrei Alexandrescu wrote:
> Walter Bright wrote:
>> Ary Borenszweig wrote:
>>> It's not like that. They don't require you to initialize a variable 
>>> in it's initializer, but just before you read it for the fist time. 
>>> That's very different.
>>
>> The only way to do that 100% reliably is to instrument the running code.
> 
> Doing it conservatively still is 100% reliable but has the user 
> occasionally add code that's not needed.

That:

1. still has the user adding dead code

2. will generate endless bug reports (*) on why sometimes the compiler 
asks for an initialization and sometimes it doesn't

3. (2) will behave in an implementation dependent manner, depending on 
how thorough the flow analysis is, making for non-portable source code


P.S. I've been doing tech support for compilers for 25 years, and I wish 
to reduce the workload by designing out things that confuse people!



More information about the Digitalmars-d mailing list