Hacker News new | ask | show | jobs
by dietkoch 2254 days ago
> And even for Android, I believe, its promotion from Google was more to mock Oracle.

It certainly helps them shift away from Java reliance, but have you ever actually coded an Android app? Android is stuck on Java 8 syntax, and Kotlin fixes that. It has a laundry list of QoL improvements over Java (delegation, type alias, extension functions, data classes, better string formatting, operator overloading, smart casting, to name a few) that make it so much more pleasing to use over Java. ESPECIALLY when coupled with the aging Android framework, which it enhances greatly.

3 comments

That is how Google plays the game to sell Kotlin, by placing it against a half baked implementation of Java 8.

If Android had an up to date full implementation of Java, the sales pitch wouldn't work that well.

In fact, there are several people that mistakenly think Android Java is Java and then get positively surprised when they learn about the real deal.

Kotlin is awesome language, don't get me wrong. I used it for some of my backend projects. I just don't see it overtaking Java ecosystem, it's a wishful thinking. Developers don't care about QoL improvements that much, they just follow vendor standards.

Another aspect is that JVM evolves without taking Kotlin in consideration, so there's always danger of JVM introducing a feature that won't be available in Kotlin (and JVM has several interesting developments namely Loom, Valhalla). Like it or not, Kotlin is second-class citizen on JVM. It made sense in Java 7 era, when Java development seemed stuck and Java thought to be mostly done. Times changed, Java is evolving at much faster rates (I would even say, faster than Kotlin these days).

This is about JVM, of course on Android Kotlin is first-class citizen and everything's good for Kotlin there.

These are all Android problems. Not Java's.