null [re: spec#]

Nick Sabalausky a at a.a
Sun Nov 7 12:40:26 PST 2010


"foobar" <foo at bar.com> wrote in message news:ib5l2a$1v9$1 at digitalmars.com...
> Nick Sabalausky Wrote:
>
>> "foobar" <foo at bar.com> wrote in message
>> news:ib3a8k$1i58$1 at digitalmars.com...
>> > 1. the INVENTOR of the "reference" concept himself admits that this is 
>> > a
>> > flawed design.
>> > see:
>> > http://qconlondon.com/london-2009/presentation/Null+References:+The+Billion+Dollar+Mistake
>> >
>>
>> First of all, "appeal to authority" is a logical fallacy. Second, there 
>> are
>> plenty of cases where run-time nullability is useful and where lack of it 
>> is
>> problematic at best: A tree or linked list, for example. The "null 
>> object"
>> idiom doesn't count, because all it does is just reinvent null, and in a
>> pointlessly roundabout way.
>>
>
> You seem to contradict yourself a bit here.

It's been awhile since I read that article you linked to, but from what I 
remember, it sounded to me like he was saying that nullability period was 
bad, and that there should never be any nulls (but maybe I'm just 
misremembering). So I thought you were also saying that there should not be 
any nullability.

>As you pointed out yourself bellow, if you really *want* to use nullable 
>types than you should explicitly use option!T instead of T.

Yup, I think we completely agree on everything here.




More information about the Digitalmars-d mailing list