HACKER Q&A
📣 wetrex

Is Kotlin on a pathway to become obsolete?


Java seems to improve at every release. What will kotlin have to do to remain relevant and not become the next groovy?


  👤 oftenwrong Accepted Answer ✓
Kotlin could easily end up "the next groovy", but it might also end up the next Java, or at least maintain its edge against Java.

Java is rapidly improving, and significant resources are being invested into that effort. To remain relevant Kotlin will have to keep up with Java's improvements, and will also have to retain enough killer features that differentiate it from Java.

Java is going to retain backwards compatibility, as they always have. This is a double-edged sword, of course. It holds Java back from fixing some its most glaring issues, but also keeps people in the ecosystem, and demonstrates desirable stability.

Kotlin, on the other hand, could more easily introduce big, breaking changes. The Kotlin world is more keen on the cutting-edge, and would probably switch to a "Kotlin 2" without much resistance. Plus, JetBrains is extremely well-equipped to provide tools for auto-upgrading old code.


👤 bestinterest
Kotlin feels to me to be in an odd spot. Java really has the incredible last mover advantage and it keeps making the right decisions in my eyes. All thanks to Brian Gotez and the team, they have incredible write ups about the language every month it feels like.

Java is very lucky to have Scala and Kotlin to learn form. I don't really see them ever taking a majority share of Java away, one of my issues when having a dive into Kotlin is the fact you need to context switch between Java and Kotlin libs all the time and at that point I'd rather just stay on Java since its progressing so much at the moment. Have a peek into Project Valhalla.

I wonder how Kotlin is going to be split when Project Loom comes along with their coroutines implementation and colored function issue sounds like another fractured library split waiting to happen in an already niche backend language.

Though its not as if Java is amazing itself, it is a bleed on the eyes, private and public keywords everywhere, no map collection literals is brutal, the cruft of libs, is Spring really the best dev experience you got Java? Lack of upgrading culture sucks, the getter/setter bullshit, and writing it is not 100% joyful like a scripting language would be. Java is very much so an enterprise 'late game' language but is slowly improving its ergonomics through project Amber.

I know people continually say the Java has amazing libs but I'm not having the same experience while trying to make my rails like setup. Where is the Sidekiq equivalent for background job processing? It's not Quartz (thats a dead lib), where is easier storage integrations like ActiveStorage? Where is something like Devise? Java for typical startup web development feels like hard mode and I assume its because Java is largely a 9 to 5 programmers language.

Having said that Kotlin will be the Android goto for the future no doubts there.


👤 yen223
As long as Java still insists on everything being a class, a lot of its shortcomings will remain in place.

👤 muzani
Java might have @Nullable and @NotNull but it doesn't compare to Kotlin's String? and String!!

Also there's the other syntactical differences. This article is a good example, although point 4 no longer applies: https://yalantis.com/blog/kotlin-vs-java-syntax/


👤 neximo64
Maybe you're asking the wrong question.

Java improved at every release or so yes, but do Android devs want to use Java or Kotlin to make their apps


👤 coldtea
>Java seems to improve at every release. What will kotlin have to do to remain relevant

Be more coherent and modern from the start, as opposed to a 1997 design that amasses new features that kinda work together and kinda not?


👤 tdeck
My impression from working on Android developer tools is that the Android ecosystem is moving to Kotlin, and that's unlikely to reverse course overnight.

👤 mardiyah
Java've been declining while Kotlin improving firmer