leifericf

leifericf

Comparing Erlang and Elixir

Hello, forum friends!

While researching for an upcoming presentation, I have been trying to compile a list/summary of differences between Erlang and Elixir and how they relate to each other.

There are a few questions in particular that I find interesting:

  • What are the biggest differences between Erlang and Elixir?
  • As a true superset of Erlang, what does Elixir bring to the table in addition?
  • Does Elixir enable certain things which are not possible in Erlang, or vice-versa?
  • Are there certain things which are more difficult in Erlang than in Elixir, or vice-versa?
  • Would you ever choose to use Erlang over Elixir? If so, in which contexts and why?

I have some thoughts of my own on these subjects that I would like to share, but I would like to hear what you all think without priming/biasing your thoughts with my own from the onset.

Most Liked

rvirding

rvirding

Creator of Erlang

I think you should be very careful when comparing syntax. What people think is a “nicer syntax” is often one which is similar to what they are used to, rather than one which is nicer/better in a more objective sense. There is nothing wrong with this but you should be aware of it.

For example, I think the elixir syntax is full of weirdness which I have not seen in the other languages I have used (and, yes, there have been quite a few) so I definitely don’t find it nicer. Also the erlang syntax is definitely simpler, more concise and more consistent as syntaxes go. Whether you find it nicer depends on your background and what you are used to.

And I do try to avoid syntax wars. :smiley:

dazuma

dazuma

A couple years ago I wrote a series of blogs on various differences (some obvious, some quite subtle) that I found when working on a transpiler. Some syntax related (inasmuch as it relates to the corresponding ASTs), but also differences related to scoping, operators, guards, metaprogramming, etc. Might be of interest. Daniel Azuma | Tech / Travel / Music

AstonJ

AstonJ

I think we’ve had a few similar threads - I’m on my mobile atm, but here’s one I found :slight_smile:

Where Next?

Popular in Discussions Top

AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
rms.mrcs
A couple of days ago I was discussing with a friend about different approaches to write microservices. He said that if he was going to w...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
New
chulkilee
Here are the list of HTTP client libraries/wrappers, and some thoughts on HTTP client in general. I’d like to hear from others how they w...
New
tomekowal
Hey guys! I want to create a toy project that shows a chart of temperature over time and updates every 5 seconds. I feel LiveView is per...
New
paulanthonywilson
I like Umbrella projects and pretty much always use them for personal Elixir stuff, especially Nerves things. But I don’t think this is ...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement