Hacker News new | ask | show | jobs
by mathw 3234 days ago
I've found it enormously useful to have languages which check on possible nulls and make sure I've attempted to handle them, rather than just merrily throwing a null reference exception when I get a surprise.

It's also extremely handy to know that a given method simply cannot return null, based on nothing but its type, in a way that the compiler will have enforced.

I feel the author is really underestimating the impact of null safety on avoiding these annoying bugs in the first place. To my mind it's like saying dynamic languages are as solid as static once once you've written your test suite - that test suite's probably going to have tests in it that you're returning the type you expected from a function, something the compiler could easily be handling for you. What a waste of time! Just like unchecked null handling.