[RFC] Throwing an exception with null pointers
Walter Bright
newshound2 at digitalmars.com
Wed Apr 16 19:58:45 UTC 2025
The focus of safe code in D is preventing memory corruption, not null pointer
dereference seg faults or other programming bugs.
A null pointer deference may be a symptom of memory corruption or some logic
bug, but it does not cause memory corruption.
D has many aspects that reduce the likelihood of bugs (such as no variable
shadowing), but that is not what safe is about.
(Yes I know that if there's a constant offset to a null pointer larger than the
guard page, it can cause memory corruption.)
More information about the Digitalmars-d
mailing list