Hacker News new | ask | show | jobs
by d3nj4l 1495 days ago
I've heard some variation of "$java_feature will make $language obsolete" for years now, most recently wrt kotlin/scala, and it's never held true. It's great for the people who use Java, but there are tons of reasons why other people use other languages.
2 comments

I've noticed the same behavior.

Imitation can only get you so far. Java is changing, and in many cases for the better, by absorbing features from other languages. However, I still think several other languages do a better job curating features to fit a niche.

That said, Loom appears to be a serious upgrade for JVM languages. Now, if startup could get an order of magnitude faster...

Java record vs. Kotlin dataclass?
That was the recent incident, yeah. Records + Pattern Matching led to many saying you no longer need Kotlin, even here on HN.
Well, for a lot of people those things are enough to go back to Java and avoid having to rely on the Kotlin ecosystem (which is not free of problems).

At which point would you say Java has improved enough to catch up with Kotlin (supposing Kotlin does not also keep improving)? As a long-term user of Kotlin, I would say I would not reach out for Kotlin anymore for new projects. The last remaining big thing Kotlin gives is non-nullability, but with simple tools, Java also has that already.

I wouldn't reach for Kotlin for backend projects at all tbeh, since the ecosystem on that side is (relative to Java) immature and doesn't always play well with standard Java tools such as JPA. Non-standard tools are half-baked, inconsistently maintained and not ready for primetime. But for apps, like in mobile, the ecosystem is rich and I would prefer it over Java, especially with advances such as KMM and KotlinJS.

My point being, Kotlin vs Java isn't just about language features, it's about community, ecosystem, use cases etc.

(Fwiw, personally I prefer Kotlin because it's more expression oriented than Java.)