Adam Warski
2 min readJul 19, 2018

--

Thank you for your comment!

Let me answer from the end. I think you are definitely right that Kotlin might be a great first step from Java to Scala. Would that make Kotlin a gateway drug to Scala? ;)

But, more seriously, I think that knowing Java you can pickup Kotlin so quickly just because there’s few things substantialy new in the language. It’s just better syntax (with some exceptions, e.g. coroutines).

So yes, coding in Kotlin will be more pleasant than in Java. But I suspect that the overall style of programming remains the same. However, I haven’t done production coding in Kotlin: so I might be wrong.

On the other hand, yes — Scala has a much steeper learning curve. But that’s because there are things to learn! There’s a number of new techniques of abstraction which simply aren’t possible (or are very cumbersome) in Java.

Regarding your three remarks from the beginning:

  1. Yes, it’s possible to do immutable programming in Kotlin, as it is in Java, but as you write — with discipline. But the ecosystem is working against you: everything library in Java uses the mutable collections from stdlib, while everything in Scala uses the immutable collections from Scala’s stdlib. That’s a big difference.
  2. I’m aware of arrow, however at least for me the syntax doesn’t look good. But maybe it’s just because I’m not used to Kotlin. I don’t think I understand the distinction between “better” and “way more than” Java. We are still on the JVM, you can map Java to Scala quite naturally, so I would say Scala is a descendand of the “Java family”.
  3. Interop with Java frameworks is a no-go — that’s true. But I would say that’s actually a good thing ;). Interop with Java libraries wasn’t problematic at least in my experience. But you are right, that is an important aspect.

--

--

Adam Warski

Software engineer, Functional Programming and Scala enthusiast, SoftwareMill co-founder