Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That’s not necessarily a mistake.

Claiming that a reference cannot be null means that if you later realize it has to be, you’ve got a potentially compat-breaking refactoring to make.

So, nullable-by-default is either a good idea or a bad idea depending on lots of complex reasons.



That's the exact same issue you run into if you suddenly find out that you need to use a different type (because.. Yeah, that's exactly what it means). That doesn't mean you should default to writing all your code without types




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: