Clojure vs C++: 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; C++: Has imperative, object-oriented and generic programming features, while also providing the facilities for low level memory manipulation. C++ compiles directly to a machine's native code, allowing it to be one of the fastest languages in the world, if optimized.
Clojure and C++ can be primarily classified as "Languages" tools.
"It is a lisp", "Concise syntax" and "Persistent data structures" are the key factors why developers consider Clojure; whereas "Performance", "Control over memory allocation" and "Cross-platform" are the primary reasons why C++ is favored.
Clojure is an open source tool with 7.85K GitHub stars and 1.25K GitHub forks. Here's a link to Clojure's open source repository on GitHub.
Lyft, OkCupid, and Twitch are some of the popular companies that use C++, whereas Clojure is used by CircleCI, Groupon, and Soundcloud. C++ has a broader approval, being mentioned in 199 company stacks & 371 developers stacks; compared to Clojure, which is listed in 95 company stacks and 80 developer stacks.
What is Clojure?
What is C++?
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 add, upvote and see more consMake 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
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.
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.
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.
C++ is used in Shiro (https://github.com/Marc3842h/shiro).
C++ is a high performance, low level programming language. Game servers need to run with fast performance to be able to reliably serve players across the globe.
The most latency sensitive parts are written in C++. Due to our interconnected services architecture, we use either Python or C++ for each service, with the performance critical parts being C++14.
Used to write PHP extensions - AZTEC Decoder - License Driver scan - Axis2/C to PHP wrapper and Job-scheduler - Barbershop
Performance, zero-overhead abstractions and memory safety of the modern C++ language make this the perfect language for the project.