3 ms·
> I'd say that Kotlin actually has almost all Scala features and notably has important features that Scala does not (such as coroutines, reified generics, compi
by kaba0 5y ago
> I'd say that Kotlin actually has almost all Scala features and notably has important features that Scala does not (such as coroutines, reified generics, compile time safe tail recursive, etc)
I really don’t see the point of coroutines, especially when a) project loom is on the horizon, b) higher kinded types make it quite trivial to implement as a library (answering your 3rd point)
I’m not sure about reified generics, they are very seldom a problem and frankly, type erasure is most often just misunderstood. Also, with pattern matching overloading is used less often so it is even less of a win.
Regarding compile time safe recursion, I’m pretty sure that Scala was actually the first bigger language implementing that (with an annotation), so it definitely has that.
So don’t get me wrong, Kotlin is a great language with some nice features, I just don’t see it doing anything novel to be honest (and that’s not a bad thing! Non-research languages rarely do anything truly novel!). I just feel like Scala does all of those with less special cases (eg. extension functions can be done with implicits so you get one feature doing many things)