Null references redux
Walter Bright
newshound1 at digitalmars.com
Sat Sep 26 16:08:02 PDT 2009
grauzone wrote:
> Walter Bright wrote:
>> grauzone wrote:
>>> Not so useful.
>>
>> It's *still* far more useful than generating corrupt output and
>> pretending all is ok.
>
> But nobody argues in favor of that?
It's implicit in the argument that some default should be used instead.
That's what I'm trying to point out.
Even forcing an explicit initializer doesn't actually solve the problem
- my experience with such features is programmers simply insert any old
value to get the code to pass the compiler, even programmers who know
it's a bad idea do it anyway.
It's a lot like why exception-specifications are a failure. See Bruce
Eckel's essay on it:
http://www.mindview.net/Etc/Discussions/CheckedExceptions
More information about the Digitalmars-d
mailing list