The thing is, if you last looked at Java in 2018, prepare for a nice surprise. I mean, we were at version 11 back then, the language has made advances in leaps and bounds.
Just to name a few: half of ML is here (records, pattern matching), we have virtual threads and soon structured concurrency, ZGC, and many more. Project Valhalla (value classes) has been long in the making, hopefully landing in a few years.
Frankly, I had worked with Kotlin and Scala in the past, but nowadays I barely see the need. Yes, Kotlin has if-expressions and null safety and immutable collections, Scala has its type system, but there are also many compromises, and to be honest, these alternatives look less and less appealing as time passes.
Honest question, going back to Java, dont you miss scope functions (let, apply, also, etc)? Extension functions? Using sealed classes and "when"? I am happy to see Java (and the JVM) improve but it still seems to be missing some of Kotlin's best language features.
Just to name a few: half of ML is here (records, pattern matching), we have virtual threads and soon structured concurrency, ZGC, and many more. Project Valhalla (value classes) has been long in the making, hopefully landing in a few years.
Frankly, I had worked with Kotlin and Scala in the past, but nowadays I barely see the need. Yes, Kotlin has if-expressions and null safety and immutable collections, Scala has its type system, but there are also many compromises, and to be honest, these alternatives look less and less appealing as time passes.