D - Unsafe and doomed

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Sat Jan 4 15:26:06 PST 2014


On Saturday, 4 January 2014 at 23:04:12 UTC, deadalnix wrote:
> Because it is an instant crash, because it is not possible to

Actually, array out of bounds is no less an instant "crash" than 
trapping page 0 which is similar to implementing stack increase 
by trapping page faults.

What is likely to happen if you add non-null-pointers without 
organization wide code reviews to enforce them, or a 
state-of-the-art partial correctness proof system to back it up, 
is that people create null objects and point to those instead. 
And that will solve absolutely no bugs.

It makes more sense for high-level languages than for those 
languages who will receive a steady stream of null pointers from 
various libraries. It makes sense for Rust, because it is a 
priority issue for the organization backing the project. It might 
have made sense for Go which is trying to stay tiny and not low 
level and don't care all that much about performance, but for D… 
get the feature set stable and prove that correct (sound) before 
starting on a route to a partial correctness proof system.


More information about the Digitalmars-d mailing list