https://kotlinlang.org logo
#announcements
Title
# announcements
v

vaskir

05/10/2017, 1:09 PM
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

lovis

05/10/2017, 1:38 PM
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

pniederw

05/10/2017, 6:24 PM
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

vaskir

05/12/2017, 3:45 PM
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

pniederw

05/12/2017, 5:04 PM
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.
12 Views