4 ms·
What would be the reasons I'd want to use Elixir over Erlang?
by arnon 7y ago
What would be the reasons I'd want to use Elixir over Erlang?
- ddragon 7y agoThe greatest feature of Elixir in my opinion (and it's a beautiful language with a lot of great features in the first place, including the advantages of the Erlang VM and Library) is the care it got in being approachable and easy to use. It has some of the best documentation I've seen extended to pretty much all environment surrounding the base language (including the integration with OTP for parallel processing), Phoenix and Ecto, plus great books and a very friendly community. The design of all those components is also very well done to avoid surprises for people coming from "modern" languages and to avoid unnecessary complexity. And it also has a nice plugin and formatter for vscode.
- pdmd_api 7y agoYes, documentation and just the syntax (to me at least) seems a hell of a lot simpler than erlang. You can always use erlang libraries in Elixir as well.
- davidw 7y agoErlang's syntax is not difficult or complex; it's just 'different' from what people are used to. I will add though, that Elixir does add some nice things besides just a more familiar syntax. Things like their string implementation stand out as a real improvement.
- PopeDotNinja 7y ago> Erlang's syntax is not difficult or complex I will say a lot of it does feel dated & crusty though, especially when digging thru the documentation. And the different forms of iodata, list, binaries, bitstrings, and other string-y things is super confusing in the beginning.
- rkangel 7y agoFrom a language point of view, the main difference is that Elixir has macros. Used judiciously they are a good tool for abstraction and can provide some nice APIs. As other people have said, there are no big new ideas in Elixir, it's just a well executed design in all the details. It also has the advantage of the tooling having been built from the ground up to current state of the art. As such, it is lovely to use. The standard library benefits similarly. For example the '|>' operator in Elixir benefits from the fact that the standard library has a consistent argument order.