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

I've never used Kotlin, but there are several systems that provide Null Analysis in Java. For example FindBugs https://findbugs.sourceforge.net/manual/annotations.html

Is Kotlin better because it works out of the box or are there differences in the feature set?



From my experience Kotlin's null handling works better than these external tools. Another point is that also the APIs need some support for it, to be convenient. Kotlin has methods like mapNotNull for example.


I agree that it's better when its built-in because the whole ecosystem uses it. Whereas in Java you may need to wrap third party code if they don't use the null analysis (or the same tool).

But regarding the feature I imagine it is the same. Or are there cases where the Java Null Analysis fails?


Some tools work on bytecode level, so it doesn't matter if the code is third party or not, other than naturally one cannot change it, but you wouldn't change it as well on Kotlin.




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

Search: