Reposting my comment from 2 years ago:https://news.ycombinator.com/item?id=21832009
A null pointer exception in Java is SAFE according to Cardelli -- it's a trapped error.
A program fragment is safe if it does not cause untrapped errors to occur. Languages where all program fragments are safe are called safe languages. Therefore, safe languages rule out the most insidious form of execution errors: the ones that may go unnoticed.
...
It is useful to distinguish between two kinds of execution errors: the ones that cause the computation to stop immediately, and the ones that go unnoticed (for a while) and later cause arbitrary behavior. The former are called trapped errors, whereas the latter are untrapped errors.
-- Type Systems, Luca Cardelli -- https://scholar.google.com/scholar?cluster=90442457768317510...
And practically speaking null pointer exceptions are easy to debug and fix.
It's really the memory safety, integer overflows, and data races (untrapped errors) that are difficult, and which the language should have mechanisms to avoid.
So this post is conflating two different things. It's criticizing Java for integers overflows that DON'T trap, and null pointers that DO trap!