Disallow null references in safe code?

bearophile bearophileHUGS at lycos.com
Wed Feb 5 19:03:47 PST 2014


Andrei Alexandrescu:

> We are considering making non-nullables the default, @nullable 
> to mark optionally null objects, and enable the related checks 
> with an opt-in compiler flag.

It's a significant transition, very interesting. I think it could 
be for the better (I asked something related time ago), but it 
must be designed and handled very well, or no at all.

After such non-nullable transition there are probably only one or 
two significant things that may be worth adding/changing in D in 
the medium term, and one of them is the implementation of the 
"scope" semantics (and something very related, a bit better 
ownership).

Bye,
bearophile


More information about the Digitalmars-d mailing list