Hacker News new | ask | show | jobs
by guelo 2373 days ago
I wonder if Java's speeding up of new language features over the past several years, after many years of a stagnant feature set, is a direct result of pressure from the likes of kotlin.
5 comments

It is mostly C# that is keeping Java on their toes. Java competes with C# than any other language in this world. In the enterprise space, it is either Java or C#. If you check most of their improvements, they were done ion C# first, then they follow.
kotlin copied a lot from C# first.
Now that is a good strategy. Copy directly from a language that is moving at a very fast pace and competing directly with the language you want to replace.
Kotlin will never replace Java, unless you are speaking about Android Java.
Of course it won't ever replace it but it has the potential to overtake it.
Maybe when I see the first JVM written in Kotlin I will consider that scenario.

Even considering ART as the KVM, isn't a safe deal, as it is written in a mix of Android Java and C++.

And currently its potential is very tiny when measuring all JVM guest languages against Java, using any recent language report.

I am indeed talking about Android Java.
Who has it now is a good question, but so too is 'who had it first'.

And if you also consider the upgrade treadmill, and where the average Java developer is relative to say ten years ago, it may turn out that at any given point in time, the Kotlin version you'd be able to deploy may have a number of features the most recent Java version you could deploy does not have.

(to say nothing of companies where 'the version' is decided by committee or fiat and thus having a more obscure language sometimes gets you less scrutiny).

Pressure is only from C# and languages like Go.

There is nothing to fear from Kotlin, it is a guest language on the JVM.

It is only relevant on Android, as Google is making ART into the KVM.

Outside Android, Kotlin market share adoption is very low, as any trends chart will easily prove.

It's not so much pressure as data. Java is conservative by design. Even back in 1997, James Gosling wrote that Java only adopts features after they've been tried in other, more adventurous languages, and then Java picks those who've shown the best cost/benefit tradeoff, and only after enough people seem comfortable with them. Java, then, depends on languages like Kotlin or Scala for crucial data about features. The interesting thing, though, is not which features Java adopts, but which ones it doesn't.
Great example of that are checked exceptions which have never been tried before or after in other languages. (at least in the form Java implemented)
Ask "how does Oracle benefit?"