Don't get me wrong - Kotlin is a very fine language with lot of promise and the comparison to Scala is not exactly fair - Scala is just a completely different league.
I really like what Odersky and the Scala community did with Scala 3; they lifted the language onto a sound new theoretical framework, streamlined the way implicits are used and got rid of puzzling irregularities. Did I mention the new sound macro system? But I'll stop fawning now.
I'm currently working on a project where we use Kotlin instead of Java. Probably wouldn't have taken the job if it was with Java and Kotlin makes it quite fun. But damn - I do miss Scala.
True "primitive" objects which are packed densely in memory and generics over such objects (to use ArrayList or equivalent instead of bare array[]) is main reason what allows .NET code to be faster than JVM code, though .Net compiler (JIT) and VM are much less optimized. But JVM (HotSpot) doesn't have choice now :-( Valhalla, when fully implemented, will gibe a huge and long-awaited performance boost.
All these hyped non-nullable Option<> maybe good, but is not a show-stopper. Performance is.
Edit: for grammar.
In traditional/non-FP code bases it's not a problem at all to check for null when a data structure uses it to signify "missing". There are usually not that many places where it's necessary.
Getting Java on par with C++/STL would be great though. No need for trove4j/colt. Anything that reduces memory usage without making people think hard would also be great to compete with golang.
Kotlin does have the !! operator for practical purposes like Java interop. Equivalent to this Scala 3 code:
extension (t: T)
def !!: T = if(t != null) t else throw NullPointerException()
I haven't checked after release, how is Scala 3 smart-casting now? E.g. Kotlin and Typescript convert a T? to a T inside an if(t != null) branch, and Scala's left much to be desired when I checked.Scala's and Typescript's union & intersection + smartcasting approach is much more general than Kotlin's T? of course, but Kotlin could introduce that backwards-compatible if they wanted.
> "I haven't checked after release, how is Scala 3 smart-casting now? E.g. Kotlin and Typescript convert a T? to a T inside an if(t != null) branch, and Scala's left much to be desired when I checked."
See: https://docs.scala-lang.org/scala3/reference/other-new-featu...It works perfectly well in a number of ways (IE, you can use "=="/"!=" null, use a "match")
https://scastie.scala-lang.org/s853XsLoQEKTVosebJHelA
Kotlin is still a better experience when interacting with Java because of inbuilt interop with Java types like "List" though, in my opinion.
In Scala you need to use ".asScala", ".asJava" etc.
Have you experimented with converting entire projects of Java to Kotlin?
As a trivial example people would rather use ScalaPB instead of officially supported Java library. When I worked on a Kotlin-based system people were adamant to use github.com/JetBrains/Exposed. Which had a couple pages of documentation and was missing features.
And then again there's politics. Big/successful companies always end up re-inventing PL wheels. The whole GOOG/ORCL mess gave GOOG incentive to fragment the Java ecosystem too.
I’ve converted several projects from Java to kotlin incrementally and it’s been very smooth.
I rather use the platform languages without extra tooling and wrapper libraries.