News for hackers. Stuff that matters.
Re:What I miss in Java, the perspective of a Kotlin developer by cies on Tuesday June 14, 2022 @04:49AM (#31736306)
Groovy and Scala have nowhere near the potential of Kotlin.

I think Kotlin actually has the potential to dethrone Java on the JVM, it is that good.

Kotlin is not much different from Java, conceptually. It is basically Java 2.0. Where Goovy does away with compile time typing, and Scala bolts a Haskell onto Java; Kotlin is "just a better Java".

Re:What I miss in Java, the perspective of a Kotlin developer by kaba0 on Tuesday June 14, 2022 @06:51AM (#31737083)
> I think Kotlin actually has the potential to dethrone Java on the JVM, it is that good.

No way.

I believe pron can do a better job articulating the reasons then I can so here is his comment: https://news.ycombinator.com/item?id=24197817

Re:What I miss in Java, the perspective of a Kotlin developer by jillesvangurp on Tuesday June 14, 2022 @05:08AM (#31736421)
Probably a good way to characterize Kotlin. Scala has a lot of interesting features but also a lot of complexity. And not all of those features are necessarily very good. Arguably, Kotlin was born out of frustration with that as Jetbrains at the time rejected the notion of using Scala internally and instead started the long process of developing their own language. It was mainly intended to be a better Java but also to avoid some of the complexity of Scala.

Groovy's lack of compile time safety is like throwing out the baby with the bathwater. It's just not worth it for me. Kotlin gets you most of the language features but without doing that.

Re:What I miss in Java, the perspective of a Kotlin developer by arunix on Tuesday June 14, 2022 @06:32AM (#31736953)
Groovy has an optional compile time checking feature on a per-class basis via an annotation (this has been around for a long time)

https://docs.groovy-lang.org/latest/html/api/groovy/transfor...

https://livebook.manning.com/book/groovy-in-action-second-ed...

Re:What I miss in Java, the perspective of a Kotlin developer by kaba0 on Tuesday June 14, 2022 @06:54AM (#31737101)
> Scala has a lot of interesting features but also a lot of complexity

I really don’t get it - I am fairly certain that feature wise Kotlin is actually a bigger, more complex language with many exceptions/edge cases. Scala is a really elegant language in that many of its features are solved by a singular base, for example implicits. And frankly, other than that it is a very easy language - programs written in it can be complex due to its high expressivity.

Re:What I miss in Java, the perspective of a Kotlin developer by aurea on Tuesday June 14, 2022 @05:36AM (#31736568)
Do you have any good articles on what would make Kotlin better than Scala? I work only in Scala and have never touched Kotlin.
Re:What I miss in Java, the perspective of a Kotlin developer by jillesvangurp on Tuesday June 14, 2022 @06:29AM (#31736917)
Not really. I likewise don't use a lot of Scala. Probably better to think in terms of how the languages are different rather than better.

Here's a good overview of differences:

https://www.baeldung.com/kotlin/kotlin-vs-scala