Why dont dlang check NullPointer?

via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 31 06:54:20 PDT 2015


On Friday, 27 March 2015 at 11:17:54 UTC, Steven Schveighoffer 
wrote:
> Please note, this is NOT a null pointer exception, it's a 
> segfault exception. This can happen with corruption (absolutely 
> should not continue) as well as forgetting to initialize a 
> variable (dangerous if not handled correctly, but still 
> feasible to continue). It may not be as black and white as if 
> it's a null pointer that was dereferenced or not. I highly 
> recommend terminating the process.

A segfault can also be I/O error on a mmap'ed file, so 
termination is not always the right action.


More information about the Digitalmars-d mailing list