Kotlin’s type system gives plenty of advantages over Java. The default to have types non-nullable, and adding nullability deliberately and optionally is a huge boon, made even better by the compilers ability to predict potential null reference errors. Something neither language does well (in my opinion), however, is handle error conditions.

Java’s checked exceptions are one of the most complained about features I’ve ever encountered, and with good reason. Having each method list every possible way in which it can go wrong, and having the caller have to directly deal with that is an exercise in boredom. …










James

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