Introducing Nullable Reference Types in C#. Is there hope for D, too?

Timon Gehr timon.gehr at gmx.ch
Mon Nov 20 11:27:15 UTC 2017


On 20.11.2017 11:07, Atila Neves wrote:
> 
> 
>> As you can guess, I happen to like null, because there are no hidden 
>> bugs from pretending it is a valid value - you get an immediate 
>> program halt - rather than subtly corrupted results.
> 
> The problem with null as seen in C++/Java/D is that it's a magical value 
> that different types may have. It breaks the type system.

In Java, quite literally so. The Java type system is /unsound/ because 
of null. (I.e. Java is only memory safe because it runs on the JVM.)


More information about the Digitalmars-d mailing list