Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Congrats on continuous progress of the team.

But I have a question. I took an online Erlang class and I actually ended up really liking the Erlang syntax once I got used to it. To me now, Erlang is now far more readable than Elixir.

I understand Elixir is designed for the Rubyist, but I'm curious how is the experience of others who have looked at both Erlang and Elixir.



I didn't like Elixir's syntax at first and I like Erlang's syntax, but Elixir is a lot more than "Erlang in rubyesque syntax" it's a brand.

Elixir is a well-thought ecosystem designed by professional developers, it includes tooling(mix), documentation(hexdocs) and most important of all: an excellent community and community support. Plataformatec often posts about design decisions and best practices and it doesn't take long till you hit a forum post or github issue or SO question answered by Jose Valim, Elixir's creator or Chris McCord, responsible for Phoenix.

You can very easily use Erlang code in Elixir projects, so I think it's worth taking a look.


There are differences beyond syntax. Macros, utf8, variable rebinding, string interpolation and probably more. Also tooling is quite different.

Obvious bias, but I feel that these Elixir additions are going to be welcomed / expected by most programmers. Macros stand out as being complicated / overwhelming, but you can largely just accept the magic and learn them at your own pace (and they end up being rather powerful).


Elixir have better syntax because it's familiar.

I did play around with Erlang a few time. I really love the comma and period. It really nest and group the function patterns together.

For Elixir you just have to put them near each other. The function are enclose in a do/end block. And you put those similar pattern function next to each other. I believe you can move those pattern function around.

Other than that I can't recall much else. Prolog syntax is foreign but I'll admit I can see myself learning Erlang pretty fast since the language isn't "big" compare to Java or Scala. Like wise Elixir is a small language too with added macro (I don't recall Erlang got this) feature. Elixir also have better tooling baked in (mix/hex, doc, lint, etc...).

Also the Erlang community sucks. This is my personal experience but I vividly recall attending a meetup. The group meetup have a discussion about Erlang's adoption and how to get better adoption. I told them Ruby got popular because RoR other wise people would have chose Python and call it a day. Erlang should really have a killer framework like a web framework. Everybody thought it was ridiculous.

And you know what? Elixir came along and so did Phoenix. Phoenix may not be the only thing that got Elixir popular, Elixir got toolings from the get go. Jose and those people are from the industry they know what was needed. They came from Ruby.


> Elixir have better syntax because it's familiar.

Which syntax is "better" depends on how you measure. I'm a big fan of Erlang's "minimalistic" syntax. It means I might have to write a bit more code, but it also means that the code, once written, is very explicit.

> Like wise Elixir is a small language too with added macro (I don't recall Erlang got this) feature.

Well, Erlang does have simple macros (-define(MACRO(Var1, Var2), {some_expr, #{ var1 => Var1, var2 => Var2 }}).) but they are nowhere near as powerful as Elixir's system. There is merl (http://erlang.org/doc/man/merl.html) which allows for something quite similar, in particular if it's combined with parse transforms. I haven't used it and haven't seen usage in the wild, though.

> Elixir also have better tooling baked in (mix/hex, doc, lint, etc...).

That I give you, while rebar3 is already a huge step forward compared to what we had before, mix's out-of-the-box feature-set is really nice.

> Also the Erlang community sucks. This is my personal experience but I vividly recall attending a meetup. The group meetup have a discussion about Erlang's adoption and how to get better adoption. I told them Ruby got popular because RoR other wise people would have chose Python and call it a day. Erlang should really have a killer framework like a web framework. Everybody thought it was ridiculous.

This is a bit harsh. You can't derive "community sucks" from "the ones at this meetup didn't share my opinion". I don't share it either. I think the main thing holding Erlang back is the current out-of-the-box tooling (rebar3 is not included in the OTP distribution) and its general performance.


Elixir fixed some annoying erlang quirks, e.g.

* Switched all the strings to waaay more efficient binary string format (with true utf8) - in erlang you have charlist, which consumes more memory, slower and less-handy binaries (and need to remember to pass around right one)

* Made standard library consistent and logical. This also affects 3rd party libraries, they have reasons to follow conventions.

* Hyped pipeline operator ("|>") by mere existence basically enforced correct order of function params


You may be interested in the perspective of another Erlang developer who moved to Elixir: https://blog.zdsmith.com/posts/sketches-of-elixir.html


Along the same lines, Saša Jurić wrong Erlang before picking up Elixir, and wrote about that here: https://www.theerlangelist.com/article/why_elixir

Also, Devin Torres, author of Poolboy, wrote https://devinus.io/the-excitement-of-elixir/ and https://devinus.io/elixir-its-not-about-syntax/




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

Search: