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

Mark smarksc at gmail.com
Tue Nov 21 01:03:36 UTC 2017


On Monday, 20 November 2017 at 22:56:44 UTC, Walter Bright wrote:
> On 11/20/2017 3:27 AM, Timon Gehr wrote:
>> On 20.11.2017 11:07, Atila Neves wrote:
>>> 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.)
>
> I'm curious. Can you expand on this, please?
>
> (In D, casting null to any other pointer type is marked as 
> @unsafe.)

This blog post seems to summarize the paper he linked to:
https://dev.to/rosstate/java-is-unsound-the-industry-perspective


More information about the Digitalmars-d mailing list