If you had to choose one single feature in Elixir that you love the most, what would it be?

I knew it! :smile:

2 Likes

Definitely pattern matching. Its the number one thing I wish I had when using other languages.

4 Likes

I do love the pattern matching, but I’d have to give it a close 2nd place to the concurrency model. It’s the first sane one I’ve seen.

3 Likes

Of Elixir itself (ignore the BEAM parts), hmm, the macro’s probably.

Of the BEAM, the CPS, most definitely. It performing CPS allows for the magical actors that we have now. ^.^

3 Likes

For me, beyond doubt the most important feature of Elixir is the fact that it’s powered by BEAM :slight_smile:

Putting BEAM aside, I’d pick the convention of passing the main data (aka “object”) as the first argument, which I personally prefer much more than the Erlang convention (object as the last arg, except exceptions :slight_smile:).

7 Likes

Protocols! Really don’t know why but I just love making me structs and protocols

1 Like

Pattern matching specifically in the function head (also my fav feature in haskell/idris/purescript). I have never been a fan of if statements/expressions in any language because of the friction of attaching a label to WHY you are doing conditional logic (which would be the name of the function that is patterned matched in the function head).

2 Likes

It’s a simple dispatcher, if you are curious in arbitrary Protocol’s over any ‘shape/type’ and not just ‘type’ I have a protocol_ex library on hex that outperforms Elixir’s even on basic type tests. ^.^

This is a big thing regardless of the language, if it supports this then it is a huge boon to productivity!

1 Like

Not necessarily a feature but my favorite aspect of Elixir the culture of explicitness. Much better than lots of magic or implicit behavior.

4 Likes

This forum!!!

16 Likes

It’s almost like Elixir…is the perfect storm…not slowed down by dogma… but enhanced by practicality…merged together by Jose’s vision and building the best programming language in the world…

4 Likes

The awesome community & leadership. Second to none.

6 Likes

It’s got to be Elixir’s hierarchical name-space and module system for me

3 Likes

i love everything in elixir. easy and relaxing syntax, pipes, guards, exunit, pattern matching, genserver, mix, functional programming. I’m feeling so happy whenever i code elixir, plus i have nothing to worry about performance.

but i would like to highlight two things that are so important that they save a lots of my time writing elixir code: typespecs and the new code formatter. We probably need to make them community best practice.

1 Like

We use typespecs for all functions but I still don’t know how to enforce them or what they really bring to the table in practice.

Can you elaborate on what typespecs give you? For us, it’s just visual clarity of the types a function is expecting.

2 Likes

With typespecs, not only you get visual clarities, but you can get more with dialyxir.

2 Likes

immutable data as much as pattern matching for me

to be blunt, I would miss pattern matching and immutable data even with José :wink:

Jośe valim
From a ruby ninja to elixir creator. What’s coming next.

I also liked pattern matching, but it came along with erlang.

2 Likes

I would say the combination of function overloading and pattern matching in the function head. As far as I know that combination is unique to erlang and elixir.