4 ms·
How would you compare elixir against clojure ?
by tejinderss 10y ago
How would you compare elixir against clojure ?
- iagooar 10y agoThey are functional to the core, but pragmatic. They allow you to get stuff done, while focusing on data instead of state of class hierarchies. Clojure runs on the JVM and interops with Java, which can be both an advantage or drawback, depending on who you ask. Personally, I don't enjoy working with the JVM too much, but people who are already using a Java / JVM stack can easily switch to Clojure while still being able to use all their libraries. Elixir runs on top of the Erlang VM which at least feels a lot more lightweight than the JVM, and has a strong focus on distributed, concurrent and fault-tolerant systems. Also, you can interop with Erlang, so you have access to many mature libraries, same as Clojure has on the JVM. Both Clojure and Elixir focus on concurrency and bring first-class support out-of-the-box. Clojure is a Lisp, which in terms of syntax is usually controversial. I personally love it, but a lot of people are overwhelmed by too many parentheses, and I kind of understand them. Elixir has a pretty polished, easy on the eye syntax. Of course, coming from Ruby, I might be a bit biased, would love to hear what people with other backgrounds think about it though. One negative point about Clojure is that it's difficult to have a really smooth and quick development environment, and debugging Clojure can be a tough task, as it basically dumps tons and tons of Java stacktraces that are very difficult to process. Here, Elixir clearly wins, as it has one of the best and most accurate stacktraces and error messages I've seen in a programming language. In the end, I think both are just terrific programming languages and have their own reasons to be. I'd actually love to work someday at a company where people would use Clojure, Elixir and many other functional programming languages, depending on the task at hand and the requirements :)