3 ms·
I was productive in Scala far faster than I was when I learned Clojure. To be completely fair, I was newer at programming when I learned Clojure, and knowing Cl
by saosebastiao 9y ago
I was productive in Scala far faster than I was when I learned Clojure. To be completely fair, I was newer at programming when I learned Clojure, and knowing Clojure definitely helped me learn Scala, so there’s something to be said for Clojure for sure.
But if I had to take an average Java programmer and teach them a new language choosing between Clojure and Scala, I’d choose Scala hands down. The gap in semantics is so much closer, and concepts and libraries are so much more easily translatable. And it is entirely possible to be productive with Scala while knowing <50% of the language.
- yogthos 9y agoScala is a huge language, and many experienced developers have trouble using it effectively. You might learn a subset of Scala that works for you, but sooner or later you'll have to work with code written by others in a style that might be completely foreign. From what I've seen, Scala code ranges anywhere from Java syntax sugar to Haskell fanfic with libraries like scalaz. Meanwhile, my team regularly hires coop students, and we never had to spend more than a couple of weeks training them to be productive in Clojure. Hiring and training people is simply not a real world problem when it comes to Clojure.
- cutler 9y agoIf semantic similarity to Java and translatability to Java libraries are your main criteria surely Kotlin is a much better option than Scala? Kotlin is also much easier to learn than Scala.
- saosebastiao 9y agoIndeed, if you merely want a better java, Kotlin is now the better choice (especially considering the superior tooling). But the limitation is that Kotlin tops out as a better java. With Scala you can start out in better java territory and go from there to wherever you want. I personally don’t use any of the pure functional libraries, but I still greatly benefit from the strongly and strictly typed but flexible type system. In the 50k+ lines on my most recent project, I can count the number of bugs that escaped the type checker with one hand.
- christophilus 9y agoI'm the exact opposite. I liked Scala, but Clojure is much simpler, and I found myself much more productive in Clojure. Anecdotal evidence cuts both ways.