
Elixir 1.3.1 released - eddd
https://github.com/elixir-lang/elixir/releases/tag/v1.3.1
======
rpazyaquian
So, I know that Elixir is powerful and good at functional programming. The one
thing I can't quite understand is _why_ we would want to program everything as
a composition of individual programs and applications, with supervisors and
application trees and message passing and the like. It seems like a lot of
overhead to accomplish something. Making everything asynchronous and detached
makes things more complicated, not less.

I hear a lot about OTP and the "let it crash" mantra, but I just don't quite
understand what's so great about it. Maybe it's just due to my problem domain
(web development), but it doesn't seem like as big a draw to Elixir and Erlang
as pattern matching and FP are.

~~~
omginternets
I don't know if you've read this[0] yet, but I think it does a good job of
explaining _how_ the "let it crash" mantra is useful in effect.

[0] [http://ferd.ca/the-zen-of-erlang.html](http://ferd.ca/the-zen-of-
erlang.html)

~~~
alanning
This exactly. I've read two books about erlang and otp, including Fred's book
and it wasn't until reading this that I felt I really "got it". I think this
should be the first thing people point to when explaining the let it crash
philosophy.

------
jswny
Seems like this is mostly a bug fixing release. Solid stuff nonetheless. I
recently learned Elixir and even though I came from an object oriented and
imperative language background, I've fallen in love with the language.
Switching back to others like JavaScript really leave me missing so many of
the functional features, especially pattern matching. I think I've been
spoiled.

------
themgt
What makes Elixir a sort of "perfect storm" is the combination of a battle-
tested, corporate funded, philosophically correct language model and VM
(Erlang/BEAM/OTP) combined with a syntax (Elixir) that's both beautiful and
comprehensible to an average programmer.

Even if you loved Erlang, I'd argue the language is just too esoteric and
jarring to most programmers to ever gain serious traction. I remember reading
about Erlang's magic back in ~2007 (maybe [1]) and giving it a brief shot but
deciding there was no way I wanted to look at that kind of code 8 hours a day.
But coming from writing fairly FP-style Ruby/CoffeeScript/ES6-7, Elixir is
feels only a step or two more down that path - in many ways actually
conceptually simpler - and with enormous benefits.

[1]
[https://pragprog.com/articles/erlang](https://pragprog.com/articles/erlang)

~~~
macintux
Replace "beautiful" with "familiar" please.

I find Elixir uncomfortable because I left behind that syntax and have no
desire to return to it.

~~~
innocentoldguy
I think "beautiful" is subjective. I personally like Elixir's syntax a lot. It
is concise, easy to read, and familiar. It also doesn't have all those
unnecessary curly braces and parenthesis, which is nice. That's what makes it
beautiful to me.

I also like Elm's syntax, which I use for doing front end work on my Elixir
projects. Both make me happy, and that's important when I have to stare at
both of them all day, every day. If something else makes you happy, then
that's what you should do all day, I suppose.

------
nilkn
Can someone explain why I should use Elixir instead of Erlang? I haven't used
either, but from a very high level it seems that Elixir has a "magic" syntax
like Ruby, where as much as possible is hidden from the user, whereas Erlang
has a much clearer and more concrete syntax. Even though Erlang's syntax is
not standard or traditional, as someone who's used neither neither language, I
find it much easier to read and understand exactly what's happening.

~~~
learc83
Ruby doesn't really have "magic" syntax anymore than any other dynamic
language does. Too much "magic" is a frequent criticism of the Rails
framework, but I've never heard that directed at Ruby.

~~~
illicium
Phoenix is filled with macro magic, and just like Rails is the overwhelming
reason to use Ruby, is pretty much the main reason why people pick up Elixir.

------
firasd
Good stuff. I've started using Elixir and Phoenix in a new project (I wanted
concurrency for making a lot of HTTP calls) and while functional programming
does take getting used to (you can not write something like a counter that
increments itself in a loop) it's been relatively easy to pick up. Compared to
learning Node.js, it's been a more relaxed and productive experience (although
maybe I'm not making a fair comparison because I've implemented way more
things in Node that I have yet to try in Elixir.)

~~~
unvs
Not exactly what you want, but I've found this snippet useful from time to
time:

    
    
        for {item, counter} <- Enum.with_index([:a, :b, :c]) do
          IO.puts("#{counter} -> #{item}")
        end
    
        0 -> a
        1 -> b
        2 -> c

~~~
shadeless
Or if you like pipelines as much as I do, you can write it as:

    
    
       [:a, :b, :c]
       |> Enum.with_index
       |> Enum.each(fn({item, counter}) -> IO.puts("#{counter} -> #{item}") end)

~~~
sanderjd
This is interesting. I'm a _huge_ fan of pipelines like that and I think
they're unmatched for being able to compose operations well, but I prefer the
non-pipelines version of what is basically just an imperative loop.

------
anonymousguy
We have been looking for an Elixir code beautifier. If you are aware of one
please let us know: [https://github.com/Glavin001/atom-
beautify/issues/545](https://github.com/Glavin001/atom-beautify/issues/545)

~~~
sugarpile
Not sure if it's what you want but Credo
([https://github.com/rrrene/credo/](https://github.com/rrrene/credo/)) exists

------
vfclists
Why are redditors and ycombinators so annoying? A new version has been
released and instead of discussing what is important and notable about this
new release,you all go off on a tangent discussing the pros and cons of
Elixir.

Why don't you guys take the discussion elsewhere so that interested readers
can focus on what is new and relevant about this release? The subject of the
post is about a new release,not about people showing of their knowledge and
opinions about computer programming and languages etc.

It just makes this forums intolerable especially those which are about new
releases new products etc.

~~~
pdimitar
You have a very adequate and concise changelog linked for this purpose.

IMO people discussing here aren't "showing off their knowledge". Posting a
version upgrade serves as a visibility reminder and people start inquiring
about the features of the language/framework. Eventually a technology gains
enough critical mass so that more people start using it.

Absolutely nothing wrong about that.

------
dingleberry
having to put 'end' leaves bad taste, which is why i stopped learning ruby.

i learned lisp instead and now i'm learning lfe (lisp flavored erlang)

do i miss something by not learning elixir?

~~~
SEMW
> do i miss something by not learning elixir?

Verses LFE? Not really, at the end of the day they're both ways of making
programs for the Erlang VM that aim to improve on Erlang. You can use any of
erlang, elixir, and LFE libraries from any of the three[0]. See Jose's comment
at [https://groups.google.com/d/msg/lisp-flavoured-
erlang/ensAkz...](https://groups.google.com/d/msg/lisp-flavoured-
erlang/ensAkzcEDQQ/I7e1MJgjulQJ) .

[0] though beware string types -- LFE string functions generally take
charlists, same as Erlang; Elixir ones take utf-8 binaries. So you lose a bit
of unicode-just-worksness compared to Elixir, but it isn't really a problem,
you just need to be aware of the mismatch and be prepared to handle it

