3 ms·
The problem is it's not though. Kotlin isn't just more concise Java. It sets out to solve a whole set of other problems such as removing use of null pointers,
by zmmmmm 7y ago
The problem is it's not though.
Kotlin isn't just more concise Java. It sets out to solve a whole set of other problems such as removing use of null pointers, enforcing immutability everywhere, etc. This has a dramatic influence on design philosophy. I'm sure if that's how you would have programmed java then its great. But if you actually just program Java normally (mutable state, null is acceptable, etc) then something like Groovy is a much more natural fit.
- thu2111 7y agoIn fairness, you can just put ? on the end of every type and they will all be nullable like in Java. It can all be mutable state just by writing var instead of val. No big deal. The compiler will yell at you if you use a nullable pointer in a place that needs non-null but you can cast it away using !! But I write Kotlin all the time and nullness checking is one of its best features. I wouldn't want to go back.