Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Elixir reminds me a lot of Clojure.

- It's a language that sits on top of another language's bytecode (Erlang vs JVM)

- It has its own task runner and dependency manager (mix vs lein)

- It has homoiconicity and macros!

- One of its main features is amazing concurrency support.

But Elixir has been in development for a much shorter time than Clojure. Yet it's approaching the same level of maturity of Clojure very quickly.

I'm eager to see where is Elixir is adopted. I hope to see it gain some traction in the web development world.



Reading this comment makes me happy as Clojure is one of the top three Elixir influences alongside Ruby and Erlang itself.

PS: Elixir is not homoiconic but we do have Lisp-style macros.


> Elixir has been in development for a much shorter time than Clojure.

This is probably because Elixir is more like Erlang than Clojure is like Java.

You might see Clojure as a more impressive feat for that reason. But to me, it means that Elixir has less to re-invent and can focus on "programmer happiness".


I though Elixir was not a whole new compiler, more like coffeescript:javascript than clojure:java.


No, it is not like coffeescript:javascript. Coffeescript compiles to javascript source code, which is then turned into bytecode by the VM. Elixir is _NOT_ compiled to Erlang source code; rather, it is compiled directly to BEAM bytecode.

So the clojure:java comparison is accurate.


Actually, it compiles to Core Erlang, which compiles to BEAM bytecode.

Core Erlang is pretty unreadable though, so I do think it's a bit more complex than CoffeeScript.


Elixir also gives you really cool meta-programming tools, a way to extend the language, that aren't part of CoffeeScript.


I can't say for sure, but I don't think it would be impossible to add that kind of capability to coffeescript, but you are right that right now coffeescript can't do that


Some people tried IIRC but they never got very far. One reason could be that syntactic abstraction is generally not in great demand, but could be something else entirely. Also, take a look at Sweet.js


"Elixir compiles directly into BEAM byte code."

from http://elixir-lang.org/crash-course.html


Elixir currently compiles to the Erlang abstract parse tree. This then gets to be BEAM byte code later on.


Good catch. I will fix the crash course.


AFAICT, it reuses components of the Erlang compiler for emitting the actual BEAM code and instead targets an AST that the compiler makes use of. I believe the goal is to eventually target Core Erlang (a different but simpler language that Erlang can be compiled to, similar to Core Haskell). Other projects like LFE make use of Core Erlang already.


Ok, that makes sense and explains my vague memory. Not source->source transformation but very different from something like scala where it really is a totally ground-up new compiler.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: