safety: null checks
qs.il.paperinik at gmail.com
Sun Nov 22 15:25:48 UTC 2020
On Sunday, 22 November 2020 at 11:52:13 UTC, Dibyendu Majumdar
> Above fails because b is null. But why doesn't the compiler say
> so? It seems like a very basic safety check.
Nullpointer exceptions aren't a safety issue since the program
crashes. For it to be a safety issue, it would need to have "bad
consequences" e.g. writes to memory at locations the program
isn't supposed to.
More information about the Digitalmars-d