Non-nullable references, again

Julio César Carrascal Urquijo jcarrascal at
Tue Dec 30 21:03:46 PST 2008

It has been discussed before but I'd still love to see non-nullable references 
on D. Here's Anders Hejlsberg position on the subject. 

> 50% of the bugs that people run into today, coding with C# in our
> platform, and the same is true of Java for that matter, are probably
> null reference exceptions. If we had had a stronger type system
> that would allow you to say that 'this parameter may never be null,
> and you compiler please check that at every call, by doing static
> analysis of the code'. Then we could have stamped out classes
> of bugs.

He then goes on to kill our hope of having this checks on any future version 
of C#. Too bad.

This is a change that will break lots of code but I think it will benefit 
the language and quality of D applications. Is it at least been looked at 
for D 3.0?


More information about the Digitalmars-d mailing list