Hacker News new | ask | show | jobs
by tathisit 1746 days ago
Kotlin does it, but it's next to useless because the ecosystem makes heavy use of null.
2 comments

what? I don't feel it's "pointless" at all. Many popular Java libraries and frameworks (including Spring) use nullability annotations which can be interpreted correctly by Kotlin. It's true that I can't be 100% sure not to get NPEs, but I think it's close enough and I've rarely seen NPEs in Kotlin codebases.
Indeed, Kotlin's null handling is great. NPE's in Kotlin code aren't common.
Kotlin is my suggestion too.

Kotlin (or any other JVM variant that does non-nullability in a seamless way) and coding guidelines should get you 90% of the way to a null-free world.