I was delighted when Jose started getting involved in the space and released Elixir. Thanks Jose!
[1] https://gilesbowkett.blogspot.com/2007/05/erlectricity-erlan...
I was delighted when Jose started getting involved in the space and released Elixir. Thanks Jose!
[1] https://gilesbowkett.blogspot.com/2007/05/erlectricity-erlan...
Losing the ; and . function endings from Erlang you can put same-named functions throughout your module. I tried doing
def create def handle(:create)
def update def handle(:update)
But the compiler warns. So that loss isn't helpful.
Atoms require a : because variable names are lowercase.
Uppercase variable names and lowercase module names is easier to read in Erlang.
The syntactic sugar is too clever for readability imo.
The package management through mix is decent. I used to use an erlang.mk file, looking at hex it looks like the Erlang ecosystem is quite evolved.
Phoenix + Ecto seem to be very actively maintained, useful if you're writing web apps.
When I tried Cowboy a few years ago some of the documentation was out of date, so that's a point in Elixir's favor.
This is ENTIRELY subjective and not a rational argument. It's in fact the exact opposite for me, but my prior language was Ruby.
http://www1.erlang.org/documentation/doc-4.8.2/doc/extension...
...but I think they work differently, or are more limited in scope.
Elixir macros are a completely different beast, they can manipulate the AST Lisp-style. A very elegant example is Elixir's unicode module, which reads unicode data tables and turns them into function definitions at compile time [1].
Compare this to the equivalent module in plain old Erlang, which has to be generated by a separate script, in a pre-compilation step in the Makefile, that literally prints blocks of code [2].
[1] https://github.com/elixir-lang/elixir/blob/v1.7.4/lib/elixir...
[2] https://github.com/erlang/otp/blob/OTP-21.2/lib/stdlib/uc_sp...
Elixir features meta-programming, structs and protocols, first-class documentation, strong focus on the tooling, some abstractions that make concurrency more accessible (such as tasks and streams), etc.
However, Erlang and Elixir share a lot! They have the same data-types (with the same names and even the same syntax for almost all of them), the runtime is the same, and the same foundation about processes, fault-tolerance and distribution.
My suggestion is to go with whatever "touches your heart" because, even if Elixir has its own features, they are more alike than they are different and most concepts you learn for one will also apply to the other.
As someone who mostly has just used Erlang, but has looked at Elixir some, I think one of the things I appreciate about Elixir is some of the Erlang warts that you've managed to work around, like having strings be Erlang binaries.
There’s only one way to do a given thing and you can learn each of the things the syntax can do in a weekend.
It was my first non-C-like, non-assembler language and I loved it.
I'm grateful that Elixir is putting Erlang under the spotlights. That it is doing a lot to conveying all the Erlang/OTP concepts and practices. But each time I use it - and I know I may be the odd duck based on slack, blog posts, etc - I feel like the syntax is so complex, with 4 different manners to write the same thing. And I'm not talking about "ways to do things", but literally syntactic ways to do the same thing.
Yup! They are not that many though (6 rules) and they are all documented here: https://hexdocs.pm/elixir/syntax-reference.html#syntactic-su...
Thanks for all the work!
I too vastly prefer Erlang’s syntax to Elixir’s. It helps me think like Erlang, and most of my functions are just a few lines long. Thanks Garrett[0].
[0]: http://www.gar1t.com/blog/solving-embarrassingly-obvious-pro...
I don't love that there are two ways to make lambdas but it's nit the worst thing in the world.
The funny thing is, if you try to add those features to the other language, they are usually refused. Erlang wants to avoid new syntactical expressions to keep it simple while Elixir's extensibility is bound to a set of limited AST rules (and we don't want to add new ones).