6 ms·
I wonder why Kotlin beat Scala in this virtual programming language traction game. I don't write code for the JVM anymore, but Kotlin occupies the same space as
by ojosilva 9y ago
I wonder why Kotlin beat Scala in this virtual programming language traction game. I don't write code for the JVM anymore, but Kotlin occupies the same space as Scala.
Was it compilation speed? Corporate support?
- _Codemonkeyism 9y agoI've been using Scala for a long time. I would be attracted to Kotlin because IDE (Intellij) verification is very slow in Scala, compilation speed is and will be slow (really interested in efforts to reduce language scope to speed up mentioned on HN earlier), error messages in Scala are a pain.
- yawaramin 9y agoTry https://github.com/Duhemm/sbt-errors-summary https://github.com/Duhemm/sbt-errors-summary
- _Codemonkeyism 9y agoThanks will use it, doesn't change the fundamental problem of error messages and multi-line type expressions. Would wish for that attitude: http://elm-lang.org/blog/compiler-errors-for-humans http://elm-lang.org/blog/compiler-errors-for-humans
- izacus 9y agoProbably because it was built to seamlessly interoperate with existing Java code and targeted JVM 6 compatibility (it was built to make development of IntelliJ IDEs simpler which had to run on Java 6 VMs and which already had a lot of code written in Java). As such it turned out to be a natural fit for Android apps as well, because the platform has pretty much the same type of limitations. Other nice things: - Standard library is tiny so you don't get a large app size and method count hit. - The datastructures are fully interoperable with Java ones so calling out to existing Java libraries and code feels completely natural. I need to stress how important this is - you can just drop Kotlin classes into existing codebase and things will just work and look natural. - The language itself it very easy to pick up - it fixes A LOT of Java pain points, but it doesn't really try to change fundamental paradigms. Which means that pretty much any Java developer can quickly become productive in it. - The IDE support it superb and practically on the same level as Java. - The compiler is fast enough and good enough.
- vbezhenar 9y agoScala is much more complex language. Kotlin is more complex, than Java, but its complexity is just enough to cover major Java pain points. Scala brings its own huge library with features that I don't need. Billions of abstract collections, but all I need is HashMap and ArrayList. They generalize over builders, so `filter` can return some fancy underlying class, but all I need for filter is to return ArrayList or lazy sequence. Kotlin again hits sweet point: all it does is extending standard Java library with few utility methods and it adds lazy sequence type (interface with one method). Due to Scala huge library it's hard to use on Android with its artificial 65k method restriction. Kotlin doesn't have this problem. Last time I checked, Intelij Idea wasn't able to parse even standard Scala library without errors. May be it's better now, but my experience is that Kotlin beta plugin was better than Scala plugin. Doesn't relate to language directly, but complexity of the language is definitely influences tooling: simplest language Go has awesome tooling. Compilation time was never an issue for me, but I guess for some projects it matters. I don't care about corporate support, but I do care about dogfunding. I didn't see Hibernate being rewritten with Ceylon. But Jetbrains use their own language for their tasks, that means that they are unlikely to abandon it. Google support probably matters a lot for Android developers as well. That said, Scala is mature language and I don't see it going anywhere soon. It has very rich set of features, it allows much better abstractions than Kotlin, it has huge projects, a lot of developers work as Scala developers. But Kotlin definitely has a momentum.
- bogomipz 9y ago>"Kotlin is more complex, than Java, but its complexity is just enough to cover major Java pain points." Would you mind elaborating on what those Java pain points are that Kotlin smoothes over? Also are people deploying Kotlin on the server side or do you see that being a thing in the future? For some reason I have this(perhaps incorrect) association Kotlin only in the context of Android. But maybe that's incorrect?
- edem 9y agoThat's incorrect. Right now I do all my development in Kotlin at my workplace and on the backend. We use Spring (which has native Kotlin support from 5.0 btw: https://spring.io/blog/2017/01/04/introducing-kotlin-support-in-spring-framework-5-0 https://spring.io/blog/2017/01/04/introducing-kotlin-support...) and deploy to a Kubernetes cluster. It is absolute seamless. I'll never write server-side code in Java again if I can help it.
- lmm 9y ago> I wonder why Kotlin beat Scala in this virtual programming language traction game. I don't write code for the JVM anymore, but Kotlin occupies the same space as Scala. If you look at the graph in the post, it didn't; Scala is substantially more popular. Kotlin is just at a different point in the hype cycle.
- edem 9y agoThat's incorrect. Scala had 13 years to achieve something while Kotlin is only around for a few years. If you extrapolate the current trends you will see that Kotlin will surpass Scala __very__ soon.
- ojosilva 9y agoExactly, that's what I meant. Traction is more like acceleration than it is speed.
- lmm 9y agoKotlin is 6 years old, so about half the age of Scala - and, despite the heavy marketing, less than half the popularity on the chart in the article. We'll see what happens; Scala's growth has been slow and organic, but the flipside of that is that its success is down to the merits of its design. (There's plenty I don't like about Scala qua Scala, but I don't see it ever being displaced by a language that lacks HKT. Kotlin has some good aspects to its design, but the anti-intellectual hostility to good formalisms and refusal to learn anything from Scala's mistakes rubs me the wrong way)
- edem 9y agoNot really. If you check google trends now you can see that it _surpassed_ Scala after the Google announcement and while it was a bump in trends if you extrapolate the trend it you can see that it will surpass Scala within a year. Higher kinded types in themselves don't have any business value so I don't see why it can't be displaced by Kotlin or Clojure. I don't see any "anti-intellectual hostility" either. Actually I'm working on a library which wraps Clojure's STM and persistent data structures. I like how Clojure works much more (you can opt-in to any extra features Clojure has to offer and they are not forced on you) compared to Scala. Clojure is a clean language with a very powerful and useful philosophy behind it, Scala on the other hand has a lot of tacked-on features and the whole language lacks consistency and philosophy (thus it lacks direction as well).
- raugustinus 9y agoNot using scala or Kotlin. But if others think like me, I bet the scala syntax is stopping them from touching it with a stick.
- edem 9y agoYep I'm not even not touching it I'm not looking either. Kotlin is 1000x times more readable and writable.
- edem 9y agoIt is not hard to beat a language which is writable and not readable. Kotlin is pragmatic, it has a purpose and that purpose is to enable Java programmers to be __much__ faster. Scala on the other hand is an academic language full of arcane features which is the result of some mental masturbation (as admitted by its creator Mr. Odersky). So it is not rocket science to answer your question.
- furrydog 9y ago> I wonder why Kotlin beat Scala in this virtual programming language traction game. The article shows google search traffic for Kotlin which temporarily spiked above Scala in the wake of the Android announcement and then dropped back down to less than half the Scala traffic, below Groovy in fact. I'm not sure that it's much of an indicator of anything. Also of interest: https://www.indeed.com/jobtrends/q-scala-q-kotlin.html https://www.indeed.com/jobtrends/q-scala-q-kotlin.html