I’m sorry for somewhat misleading click-bait title. I failed to give this story a better title. Javas handling of null in its type-system is a mistake. It was said countless times before by many people, but I am still amazed by the sheer number of people who, in the year 2019 (even C# had accepted the truth!), defend the way Java handles null, so I felt obliged to write about that. Unfortunately, there is little chance for a change in Java itself anytime soon, so the only advise I can give is to move to Kotlin. There is (virtually) nothing to loose, but a lot to gain.

Project Lead for the Kotlin Programming Language @JetBrains

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store