Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why nullable types?. Parent comment
You need to do it anyway or you got a crash. Because remove null from a existing language completely is nearly impossible.
And now the compiler is able to know something went wrong in your code instead of happily see you use `null` as a object and crash the whole program.
Besides that, that also benefit the library users that the compiler/ide will tell them `you can't pass null here`
There are no comments on this comment yet.
You need to do it anyway or you got a crash. Because remove null from a existing language completely is nearly impossible.
And now the compiler is able to know something went wrong in your code instead of happily see you use `null` as a object and crash the whole program.
Besides that, that also benefit the library users that the compiler/ide will tell them `you can't pass null here`