is there a scala vs kotlin cheat sheet? I briefly ...
# announcements
v
is there a scala vs kotlin cheat sheet? I briefly looked at Kotlin and have not found anything better than in even Scala. No pattern matching is a fantastically weird feature, for instance.
l
vaskir: if you’re happy with scala, then stick to it. if you like the better android support, null as part of the typesystem, inline functions that make your functions look like language constructs; or simply prefer kotlin’s syntax then use kotlin.
p
kotlin provides many of scala’s benefits at a fraction of the cost, avoids some of the more dangerous/contested scala features, has better java compatibility and better tooling. I like scala and have used it in production, but have found kotlin to be a dramatically easier sell to my teams.
looking at spark’s scala coding guidelines, they are essentially describing kotlin
😅 1
kotlin also has a few things that scala doesn’t have, e.g. coroutines (great for writing async services) and official js and (soon) native backends.
v
I don't know scala very well, never used it in production. But a language without pattern matching is super restrictive for my taste.
p
when
expressions are poor man’s pattern matching. Full pattern matching was on the 1.0 roadmap but later deprioritized, claiming that it’s not all that useful outside of writing compilers. I’d like to see it eventually, but so far I’ve been doing OK with
when
, even when porting some real-world Scala code that was (over)using a fair bit of pattern matching.