Clojure vs Scala: What are the differences?
Clojure: A dynamic programming language that targets the Java Virtual Machine. Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system; Scala: A pure-bred object-oriented language that runs on the JVM. Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.
Clojure and Scala belong to "Languages" category of the tech stack.
"It is a lisp", "Concise syntax" and "Persistent data structures" are the key factors why developers consider Clojure; whereas "Static typing", "Jvm" and "Pattern-matching" are the primary reasons why Scala is favored.
Clojure and Scala are both open source tools. It seems that Scala with 11.8K GitHub stars and 2.75K forks on GitHub has more adoption than Clojure with 7.85K GitHub stars and 1.25K GitHub forks.
According to the StackShare community, Scala has a broader approval, being mentioned in 437 company stacks & 324 developers stacks; compared to Clojure, which is listed in 95 company stacks and 80 developer stacks.
What is Clojure?
What is Scala?
Want advice about which of these to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
Scala is the God of languages. A legend. The Mount Rushmore of hybrid OO/functional languages is Scala's face four times over.
Ok, honestly, we love Scala. We love(d) Java (and it's parents C and C++), and we love(d) all the languages that borrowed cough stole cough from Java over the years such as Groovy, Clojure, and C#.
It may not be perfect (it totally is, but since programming languages don't have egos of their own, we don't want to paint it too bright), but it is awesome. It runs on the JVM, you can utilize Spring, it works great for data processing (which is sorta kinda the thing we do here, folks), and it just makes sense at all levels.
To complement Java. The REPL lets me interactively exercise Java code. I can write performant and safe libraries in Java, and then use them in Clojure. I also find the data-centric aspect of Clojure (excellent build-in structures, literal syntax for easily creating those structures, functions that act well on abstractions of those structures) good for data processing.
This fits a sweet spot between Ruby and Java.
Nearly our entire server codebase is written in Scala (if you haven't heard of it, it's a programming language that is basically what you would get if Java + ML had a baby). This has worked out super well. It enables us to write concise easy to deal with code that is typechecked at compile time. It's also been a big help with recruiting.
We use Clojure mostly for its "Minority Report"-like interactive development in situations that require 'semi-automatic programming' (data inspection, admin tasks, API exploration, scrapers, etc.). We have also used Clojure successfully to build some components of our stack very quickly and reliably, in the backend and the frontend.
just started learning clojure, maybe around two weeks or so. i'm addicted. this is what i want to be working with and learning for the foreseeable future. the elegance of the language is refreshing. the community is really amazing. i've finally found a language that fits my passion for programming.
worked with scala for around 2 years. really enjoyed the language and getting back into the world of functional. unfortunately the community is heavily fragmented and the language itself broken and inconsistent. that with the various factions involved made it a put of for long term investment.
Clojure simplifies and reduces the coding efforts involved in creating CloudRepo. The fact that it runs in the JVM gives us access to all the libraries that we could ever need. Our code base is much smaller and easier to reason about than it would have been had we gone with pure Java.
Scala, Akka and Spray (which became Akka-Http) provided the building blocks for the menu service.
Akka's actors and finite-state machine were a natural way to model a USSD menu (a series of stateful interactions between a subscriber and the USSD gateway).