For a language that has been there for 29years, it's very hard to get such momentum.
For a language that has been there for 29years, it's very hard to get such momentum.
I actually wrote about Erlang's "strange birth" - for an open source language, at least - here: http://journal.dedasys.com/2009/06/18/the-erlang-paradox/ and what it has meant for the language. Basically, that it was born into a production environment and therefore very difficult to change much once it was released into the wild.
IMO Elixir does a great job at reducing the inherent complexity of the Erlang syntax, while keeping its powerful features (Erlang-procs, horizontal scalability, fault-tolerance).
This is already possible with other VM-centric ecosystems (particularly the ones surrounding the JVM and the .NET CLR), but it feels like the BEAM ecosystem is making that sort of interoperability more of an explicit goal.
Ok, the syntax is weird (and sometimes infuriatingly so), but I didn't find it that hard to learn, and I had never seen a functional language (I came from mostly PHP, with some perl, and a small amount of C and/or C with a C++ compiler, and a little bit of Javascript). Single assignment is new and different, but really the only thing that really causes problems with is something like a for loop; and you learn the two or three ways to do a for loop differently pretty quickly. C, Perl, PHP and Java all have function pointers too, you just don't use them as often.
The important thing is starting to learn Erlang on a project that has a lot of concurrency, so you're making that part of the project easier in exchange for having to learn to think a little differently.
def foo(bar,baz) do
...
end # foo
This brings me to why a bare `end` makes more sense (in the case of Elixir, at least): because every use of `end` corresponds to a `do`. The above code is basically equivalent to `def foo(bar,baz) { ... }`, since `def` takes a function specifier and a block as its arguments.If you really don't like `end`, you can also (at least with Elixir) use the shorthand form:
def foo(bar,baz), do: ...And an unnecessarily verbose one.
Alternately: what's wrong with `end`?