Benefits of Elixir over Erlang?

I had promised myself, and José, not to get into discussions like this but someone else has already thrown down the gauntlet. :smile: So:

  • While you may prefer the elixir syntax, because it feels more comfortable or closer to what you are used the erlang syntax syntax, however you look at it, is simpler and more consistent.

  • I am an old lisper from way, way, way back so I fully understand the power of macros. And their problems as well. They are probably the best tool for writing code which is totally incomprehensible by others. So there is a very good reason that they were not included in erlang. Also if you want macros as god intended then you should use LFE. :grin:

  • I am ambivalent about avoiding boilerplate code. While it is nice not to have to write stuff the gain gets become small when you migrate from example code to real programs. Also even if you don’t see you have to know it is there so you can understand what is going on.

  • Also being explicit is good. It makes it easier for other people to see what you mean and what is happening. Hiding things is not good in the long run.

  • Let’s face it Agents are not really an abstraction you want to go with. I know clojure has them but they are really just global variables. With all the problems that you get with global variables. And they are implemented with gen_servers.

  • Yes, elixir tooling is better than erlang’s but with rebar3 we are catching up. Also I would say that tooling is more important in the beginning of a project, and with short projects, but becomes less important as time goes on.

  • Having binary strings is actually not that much of a benefit over lists, though it might feel more comfortable to use as other languages do it that way.

  • I have practically no knowledge about the web server side so I will take your word for it about phoenix being a good tool.

  • Etc, etc, etc …

It all boils down to which choices you make, what you feel is important and how you want to work. So while some choices made by elixir are the same as for erlang, otherwise it would not be implemented on top of erlang/otp, some choices are different. These are what makes the languages/systems different. As they quite happily coexist you are free to choose what you feel is important and go with that.

These are of course all my views, and I know many will not agree with me.

I will stop now or else I will never finish,

Robert

25 Likes