Hacker News new | ask | show | jobs
by Shawnecy 564 days ago
The first case should reduce to a Record for Java.

They give no examples of where Kotlin's extra type inference is of benefit.

They don't compare virtual threads to coroutines.

I stopped reading after that.

1 comments

It could have been a more extended article, I agree with that, and perhaps in more detail. Having said that, I don't think in general many people would read such a long article. Sometimes stuff given in a nutshell can trigger curiosity for one to do their own research and actively find what the differences are between Java and Kotlin. One note though, virtual threads aren't per se directly connected with Java. Though they are frequently presented under the context of the Java programming language, they are part of the JVM ecosystem and have nothing to do with the programming language. And there are also coroutine implementations in Java, though extremely verbose and horrendous, that work in the same way as Kotlin coroutines. In principle, we should be able to use Java Virtual Threads with any language in the JVM ecosystem and we can also implement the continuations with ForkJoinPools principles associated with Coroutines in Java. One thing doesn't stop the other and although in the beginning most of us seemed to be led to believe that they belonged to the discussion between Java and Kotlin, they actually do not. Have a good one!