|
|
|
|
|
by Alupis
1199 days ago
|
|
But you do not have to choose Java over Kotlin - you can use them both in the same project without any side effects. This was by design for Kotlin, and is probably their smartest/best feature. All existing Java code/libs just work in Kotlin. Conversely, most Kotlin code/libs just work in Java, although some care needs to be made there. Kotlin is amazing to use and read. For most things, the Kotlin version is easier to read and comprehend than the Java version in my experience. As Java adds language features, Kotlin either gets them for free or already had them (and now can use native features instead of their own custom features). |
|
Subjectively, a lot of Kotlin features are implemented in a kind of ad-hoc way because they're designed to be as easy to use up-front as possible, at the cost of consistency. So the language has a kind of "technical debt" - it's hard to evolve it in the future. Add in the fact that the language lacks the higher-level abstraction facilities that would let you work around these incompatibilities (e.g. Scala has its own Option that's different from Java Optional - but this isn't a big problem because you can write a generic function that works on both. But you can't write a function Kotlin that works on both Java Optionals and Kotlin nullable types), and I'm really skeptical about its future.