News for hackers. Stuff that matters.
Re:Lilith: x86-64 OS written in Crystal by yellowapple on Monday December 23, 2019 @05:48PM (#21868183)
Having done lots of development in both Ruby and Elixir (both professionally and on my free time), I'd say the only substantial differences boil down to the following:

- Elixir has |> instead of method chaining

- Elixir uses "do [...] end" consistently for blocks (as opposed to Ruby omitting the "do" in front of function/module/class/etc. bodies)

- Elixir supports Erlang-style tuples on a syntax level while Ruby (AFAICT) does not

- Elixir supports Erlang-style pattern matching / destructuring while Ruby (last I checked) does not

- Elixir's a fair bit stricter about differentiating zero-argument function calls from variables (i.e. if it's ambiguous it'll complain)

That is to say, Elixir's syntax descends directly from Erlang and Ruby, just as Ruby's syntax descends directly from Eiffel and Perl, and it shows rather strongly. That should be unsurprising, given that Elixir is the creation of a (former?) Rails maintainer.

There are no comments on this comment yet.