Spec#, nullables and more
Walter Bright
newshound2 at digitalmars.com
Sat Nov 6 18:08:16 PDT 2010
bearophile wrote:
>> I don't see that non-null is such a special case that it would benefit from a
>> special case syntax.
>
> Well, nonnull are a special cases because:
> - There is a good enough way to solve this problem. This is not true in the general case.
> - null exceptions are very common bugs, among the most common ones in Java and C#.
Any type having an unexpected value in it is a very common bug. They often go
unnoticed, though, because they don't generate a seg fault. The bug is still
there, though.
So no, I don't agree it is a special case.
More information about the Digitalmars-d
mailing list