Need advice about which tool to choose?Ask the StackShare community!

Clojure

1.4K
1.3K
+ 1
1.1K
Elixir

2.9K
2.9K
+ 1
1.3K
Add tool

Clojure vs Elixir: 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 Elixir? Dynamic, functional language designed for building scalable and maintainable applications. Elixir leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.

Clojure and Elixir can be categorized as "Languages" tools.

"It is a lisp", "Concise syntax" and "Persistent data structures" are the key factors why developers consider Clojure; whereas "Concurrency", "Functional" and "Erlang vm" are the primary reasons why Elixir is favored.

Clojure and Elixir are both open source tools. Elixir with 15.5K GitHub stars and 2.21K forks on GitHub appears to be more popular than Clojure with 7.82K GitHub stars and 1.25K GitHub forks.

According to the StackShare community, Elixir has a broader approval, being mentioned in 175 company stacks & 183 developers stacks; compared to Clojure, which is listed in 95 company stacks and 76 developer stacks.

Decisions about Clojure and Elixir

#rust #elixir So am creating a messenger with voice call capabilities app which the user signs up using phone number and so at first i wanted to use Actix so i learned Rust so i thought to myself because well its first i felt its a bit immature to use actix web even though some companies are using Rust but we cant really say the full potential of Rust in a full scale app for example in Discord both Elixir and Rust are used meaning there is equal need for them but for Elixir so many companies use it from Whatsapp, Wechat, etc and this means something for Rust is not ready to go full scale we cant assume all this possibilities when it come Rust. So i decided to go the Erlang way after alot of Thinking so Do you think i made the right decision?Am 19 year programmer so i assume am not experienced as you so your answer or comment would really valuable to me

See more

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.

See more
Timm Stelzer
VP Of Engineering at Flexperto GmbH · | 18 upvotes · 373.2K views

We have a lot of experience in JavaScript, writing our services in NodeJS allows developers to transition to the back end without any friction, without having to learn a new language. There is also the option to write services in TypeScript, which adds an expressive type layer. The semi-shared ecosystem between front and back end is nice as well, though specifically NodeJS libraries sometimes suffer in quality, compared to other major languages.

As for why we didn't pick the other languages, most of it comes down to "personal preference" and historically grown code bases, but let's do some post-hoc deduction:

Go is a practical choice, reasonably easy to learn, but until we find performance issues with our NodeJS stack, there is simply no reason to switch. The benefits of using NodeJS so far outweigh those of picking Go. This might change in the future.

PHP is a language we're still using in big parts of our system, and are still sometimes writing new code in. Modern PHP has fixed some of its issues, and probably has the fastest development cycle time, but it suffers around modelling complex asynchronous tasks, and (on a personal note) lack of support for writing in a functional style.

We don't use Python, Elixir or Ruby, mostly because of personal preference and for historic reasons.

Rust, though I personally love and use it in my projects, would require us to specifically hire for that, as the learning curve is quite steep. Its web ecosystem is OK by now (see https://www.arewewebyet.org/), but in my opinion, it is still no where near that of the other web languages. In other words, we are not willing to pay the price for playing this innovation card.

Haskell, as with Rust, I personally adore, but is simply too esoteric for us. There are problem domains where it shines, ours is not one of them.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Clojure
Pros of Elixir
  • 118
    It is a lisp
  • 101
    Persistent data structures
  • 100
    Concise syntax
  • 89
    jvm-based language
  • 88
    Concurrency
  • 82
    Interactive repl
  • 76
    Code is data
  • 61
    Open source
  • 60
    Lazy data structures
  • 55
    Macros
  • 48
    Functional
  • 22
    Simplistic
  • 21
    Immutable by default
  • 19
    Excellent collections
  • 18
    Fast-growing community
  • 14
    Simple (not easy!)
  • 14
    Multiple host languages
  • 14
    Practical Lisp
  • 9
    Because it's really fun to use
  • 9
    Community
  • 9
    Addictive
  • 8
    It creates Reusable code
  • 8
    Web friendly
  • 8
    Rapid development
  • 7
    Minimalist
  • 5
    Programmable programming language
  • 5
    Java interop
  • 4
    Regained interest in programming
  • 3
    EDN
  • 3
    Compiles to JavaScript
  • 2
    Share a lot of code with clojurescript/use on frontend
  • 169
    Concurrency
  • 155
    Functional
  • 130
    Erlang vm
  • 110
    Great documentation
  • 103
    Great tooling
  • 84
    Immutable data structures
  • 79
    Open source
  • 76
    Pattern-matching
  • 61
    Easy to get started
  • 58
    Actor library
  • 29
    Functional with a neat syntax
  • 28
    Ruby inspired
  • 24
    Homoiconic
  • 23
    Erlang evolved
  • 21
    Beauty of Ruby, Speed of Erlang/C
  • 17
    Fault Tolerant
  • 13
    High Performance
  • 13
    Simple
  • 10
    Good lang
  • 9
    Stinkin' fast, no memory leaks, easy on the eyes
  • 9
    Doc as first class citizen
  • 9
    Pipe Operator
  • 7
    Resilient to failure
  • 6
    Fun to write
  • 5
    OTP
  • 5
    GenServer takes the guesswork out of background work
  • 4
    Fast, Concurrent with clean error messages
  • 4
    Idempotence
  • 4
    Not Swift
  • 4
    Pattern matching
  • 2
    Error isolation
  • 1
    Easy to use
  • 1
    Dynamic Typing

Sign up to add or upvote prosMake informed product decisions

Cons of Clojure
Cons of Elixir
  • 9
    Cryptic stacktraces
  • 4
    Need to wrap basically every java lib
  • 4
    Toxic community
  • 3
    LISP!!!!!!!!
  • 3
    Good code heavily relies on local conventions
  • 2
    Slow application startup
  • 2
    Tonns of abandonware
  • 1
    Usable only with REPL
  • 1
    Hiring issues
  • 1
    Bad documented libs
  • 1
    Macros are overused by devs
  • 1
    Tricky profiling
  • 1
    IDE with high learning curve
  • 1
    Configuration bolierplate
  • 1
    Conservative community
  • 0
    Have no good and fast fmt
  • 11
    Fewer jobs for Elixir experts
  • 7
    Smaller userbase than other mainstream languages
  • 5
    Elixir's dot notation less readable ("object": 1st arg)
  • 4
    Dynamic typing
  • 1
    Difficult to understand
  • 1
    Not a lot of learning books available

Sign up to add or upvote consMake informed product decisions

What is Clojure?

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 Elixir?

Elixir leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention Clojure and Elixir as a desired skillset
CBRE
United States of America Colorado Denver
CBRE
Brazil Sao Paulo Sao Paulo
CBRE
United States of America New York New York
CBRE
United States of America California Alhambra
CBRE
United States of America Illinois Chicago
CBRE
United States of America Illinois Chicago
What companies use Clojure?
What companies use Elixir?
See which teams inside your own company are using Clojure or Elixir.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Clojure?
What tools integrate with Elixir?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Oct 24 2019 at 7:43PM

AppSignal

JavaScriptNode.jsJava+8
5
823
GitHubPythonGit+22
17
13725
GitHubGitDocker+34
29
41494
What are some alternatives to Clojure and Elixir?
Scala
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.
Haskell
It is a general purpose language that can be used in any domain and use case, it is ideally suited for proprietary business logic and data analysis, fast prototyping and enhancing existing software environments with correct code, performance and scalability.
Common Lisp
Lisp was originally created as a practical mathematical notation for computer programs, influenced by the notation of Alonzo Church's lambda calculus. It quickly became the favored programming language for artificial intelligence (AI) research. As one of the earliest programming languages, Lisp pioneered many ideas in computer science, including tree data structures, automatic storage management, dynamic typing, conditionals, higher-order functions, recursion, and the self-hosting compiler. [source: wikipedia]
Julia
Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.
Erlang
Some of Erlang's uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance. OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems.
See all alternatives