Reputation: 44061
Both languages are JVM based with strong support for functional programming. I'm aware that there would be a large class of problems where both languages would provide excellent solutions.. What I would like to know is if there are any particular types of problems where features of Clojure would give it a notable edge against Scala and vice versa. At the moment we do a lot of our work in Scala but I would like to be on the lookout for particular problem spaces where Clojure can potentially provide a better solution.
Upvotes: 25
Views: 3042
Reputation: 4224
One of the great things about Clojure and Scala is that you can use both of them in the same place, with minimal friction. I'd only suggest doing most of the interop in Clojure, since I think it has an edge there.
Just try both, and see which problems and languages fit together. You can always interoperate between Java, Scala, and Clojure code in the same system very easily.
Upvotes: 4
Reputation: 106381
Both languages are extremely capable and suitable for almost all domains. You can't particularly go wrong with either language - I'd go so far as to say that they are probably the two most promising languages around at the present.
I still think there are a couple of areas where they each have distinctive advantages:
Clojure's particular strengths relative to Scala:
Scala's particular strengths relative to Clojure:
For completeness, there are a couple of distinctive advantages that both languages share:
Upvotes: 38
Reputation: 61081
I prefer using Clojure for writing DSLs because of Clojure's macro system. Also, I prefer Clojure for certain kinds of concurrent systems. Clojure's native support for software transactional memory is quite different than Scala's actor model.
Clojure doesn't have great support for object oriented programming. For projects where the object oriented paradigm works well, or you will be relying heavily on Java libraries/frameworks, I prefer Scala.
Upvotes: 11