4 ms·
Kotlin examples on the site are not much different from Java ones. They're almost identical in length. Why bother to use it and add one more step for translatio
by betimsl 9y ago
Kotlin examples on the site are not much different from Java ones. They're almost identical in length. Why bother to use it and add one more step for translation to a compiler chain that is already very slow.
Same with Scala. I once ported a Scala program to Java one and ended up with much shorter and concise code.
- jayd16 9y agoCompiles aren't that slow compared to other languages and Kotlin compiles directly to bytecode, not through Java, so its replacing the last link on the chain, not extending it.
- romanovcode 9y ago> I once ported a Scala program to Java one and ended up with much shorter and concise code. I don't see why you are surprised. Especially at the concise part.
- thoman23 9y agoHmm, migrate to Java from Scala in search of shorter, concise code? Something tells me the Scala developer in that case basically wrote Java code to begin with.
- krallja 9y ago> Why bother to use it and add one more step for translation to a compiler chain that is already very slow. I think you have a misconception about how Kotlin and Scala are compiled. Java source code is not generated by either of these compilers -- they both compile directly to .class files, just like javac does. There is no extra step, just a different step.
- swsieber 9y agoBut, from what I know, Scala is compilation is really, really slow. So if you're only familiar with Scala and not Kotlin, you may get the wrong idea.
- geodel 9y agoFew days back I start investigating Kafka for our project. I was under the impression that it was all Scala. But downloading, setting up, and reading document I realized that a large amount of Scala API is deprecated and replaced with newer Java equivalents.