Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Elixir School (elixirschool.com)
43 points by lobo_tuerto on March 7, 2018 | hide | past | favorite | 6 comments


Can anyone actually explain to me the _exact_ differences between Elixir and Erlang?

What does Elixir offer me that Erlang does not on a LANGUAGE level?


The ecosystem is miles ahead. I started with Erlang and I've never thought the syntax of Elixir was any better, but the developer experience of getting a basic web-app up and running using Phoenix compared to say cowboy or yaws is 10x better


In no particular order:

* Proper binary string.

* AST level hygienic lisp like macros.

* Doctests.

* In general easy documentation.

* Tooling in general. Erlang had no reliable package manager before piggybacking the elixir one has an example.

* Protocols for polymorphism.

* You lose nothing from erlang because you can call all of erlang and its library really easily.

* Better errors message.

The better tooling is large. Elixir ship with a great unit testing library, a build tool that works, a package manager that works really well, a way to build documentation etc etc.

The ecosystem is also easier to use imho. Ecto is miles away of most database wrappers and Plug and Phoenix are far more easier to use than erlamg equivalent imho.


It’s very easy to consolidate multiple erlang modules (files) in a single elixir file. Simple to translate erlang to elixir.

Functional programming is a big win, but don’t forget the virtues of static type systems and compile-time code verification.

https://github.com/cieplak/examples/tree/master/elixir


Macros are also another big plus for elixir IMHO (of course you have alternatives, like LFE).

Some may argue that macros should be avoided, but that's a different subject.


readability




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

Search: