ErlangInside

4

Wrz

Joe Armstrong's "A Week With Elixir"

Joe Armstrong’s critique of Elixir – written after spending a week learning the language – is a thoughtful breakdown of the good, the bad, and the complicated.

Joe was first intrigued by Elixir when he realized two people he admired – Dave Thomas and Simon St. Laurent – were writing books on it. As Joe says, “Experts in a particular field can often instantly know that something is right, but they can’t explain why.” Both felt there was something special about Elixir, though, so Joe followed their lead. When they responded to his emails with copies of their books, he decided to start learning.

Elixir, he noticed, shares Erlang’s semantics but has a different syntax. The syntax is inspired by Ruby and is, as he puts it, much “friendlier”.

He then breaks down Elixir piece-by-piece, judging it against his Laws of Programming Language Design:

  1. What you get right, nobody mentions.
  2. What you get wrong, some will nit-pick.
  3. What you make difficult, you have to explain over and over and over again.

The good, the bad, and the complicated. In terms of Elixir, for Joe, the good includes the pipe operator, sigils, macros, and closures, to name a few; the bad includes the send operator, post-list commas, and no leniency for extra whitespace outside of strings, for example. And then there’s the (sometimes unnecessarily) complicated, like the fact that functions have an extra dot.

In the end, though, he agrees that the good far outweighs anything else.

Read the critique in full here.

Skomentuj