Need advice about which tool to choose?Ask the StackShare community!
Clojure vs ClojureScript: What are the differences?
What is 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.
What is ClojureScript? A Clojure compiler targeting JavaScript. ClojureScript is a compiler for Clojure that targets JavaScript. It is designed to emit JavaScript code which is compatible with the advanced compilation mode of the Google Closure optimizing compiler.
Clojure and ClojureScript can be primarily classified as "Languages" tools.
Clojure and ClojureScript are both open source tools. It seems that ClojureScript with 8.12K GitHub stars and 724 forks on GitHub has more adoption than Clojure with 7.85K GitHub stars and 1.25K GitHub forks.
CircleCI, Groupon, and Soundcloud are some of the popular companies that use Clojure, whereas ClojureScript is used by Swish, AdStage, and Multunus. Clojure has a broader approval, being mentioned in 95 company stacks & 80 developers stacks; compared to ClojureScript, which is listed in 24 company stacks and 17 developer stacks.
We’re a new startup so we need to be able to deliver quick changes as we find our product market fit. We’ve also got to ensure that we’re moving money safely, and keeping perfect records. The technologies we’ve chosen mix mature but well maintained frameworks like Django, with modern web-first and api-first front ends like GraphQL, NextJS, and Chakra. We use a little Golang sparingly in our backend to ensure that when we interact with financial services, we do so with statically compiled, strongly typed, and strictly limited and reviewed code.
You can read all about it in our linked blog post.
Pros of Clojure
- It is a lisp117
- Persistent data structures100
- Concise syntax100
- jvm-based language90
- Concurrency89
- Interactive repl81
- Code is data76
- Open source61
- Lazy data structures61
- Macros57
- Functional49
- Simplistic23
- Immutable by default22
- Excellent collections20
- Fast-growing community19
- Multiple host languages15
- Simple (not easy!)15
- Practical Lisp15
- Because it's really fun to use10
- Addictive10
- Community9
- Web friendly9
- Rapid development9
- It creates Reusable code9
- Minimalist8
- Programmable programming language6
- Java interop6
- Regained interest in programming5
- Compiles to JavaScript4
- Share a lot of code with clojurescript/use on frontend3
- EDN3
- Clojurescript1
Pros of ClojureScript
- Functional and stable2
Sign up to add or upvote prosMake informed product decisions
Cons of Clojure
- Cryptic stacktraces11
- Need to wrap basically every java lib5
- Toxic community4
- Good code heavily relies on local conventions3
- Tonns of abandonware3
- Slow application startup3
- Usable only with REPL1
- Hiring issues1
- It's a lisp1
- Bad documented libs1
- Macros are overused by devs1
- Tricky profiling1
- IDE with high learning curve1
- Configuration bolierplate1
- Conservative community1
- Have no good and fast fmt0