Why Elixir (2014)

brudgers | 150 points

I really am in awe of Elixir. I think it's an amazing language, and it introduced me to Erlang and OTP. I've come from using scala actors, and I can do more in way less time, less memory, and similar performance if I use Elixir.

That said, there are some things that suck so hard about it.

The log messages suck. If I want to use them in production and actually ship them to ELK or similar, the format really sucks.

Getting information on what happens at compile time vs run time is hard.

How do you handle operating system signals? like when your autoscale group decides to scala down and you get a SIGTERM with some time to handle it, what do you do? wrapper scripts suck.

Not many great design resources.. I mean I've got lots of books on OTP. But if i'm building a daemon which reads off a queue and talks to some databases - where are some patterns I can follow? How do I handle config? What if I want to hotload it?

What command do I run? when do I run an app vs compiling it? What If I want command line args? Where's a good example of writing an app, which is a daemon, and using an escript to reconfigure it at runtime?

The error messages. Holy hell. What actually caused a pattern match to not work? what is it expecting? especially a few function calls deep - like interaction between tuples and arrays and keyword lists.

Flow / Genstage and getting them into a supervision tree? what's the best practices.

I want to introduce it to my workplace but without some of these common patterns easy to find, it's kind of a risk to the business.

anko | 7 years ago

Very relevant to this: How to sell Elixir - a talk from today's ElixirLondon https://speakerdeck.com/evadne/how-to-sell-elixir

MartinMond | 7 years ago

I started learning Erlang a few months ago and after spending a week with the online class at Future Learn [0] I can understand why some people say Erlang is more readable than Elixir.

I know if you're coming form Ruby world, Erlang almost feels second nature. However, for people coming from other languages, I recommend looking into Erlang as well. It's more expressive, IMHO.

[0] https://www.futurelearn.com/courses

salimmadjd | 7 years ago

> Elixir macros are nothing like C/C++ macros. Instead of working on strings, they are something like compile-time Elixir functions that are called in the middle of parsing, and work on the abstract syntax tree (AST), which is a code represented as Elixir data structure. Macro can work on AST, and spit out some alternative AST that represents the generated code.

The description above from the article seems like closer to the Lisp macros. I have not programmed in Elixir yet.

Can someone who knows comment on the similarity here?

tmbsundar | 7 years ago

I've been working primarily in Elixir for the past 3 or so years after being in enticed by erlangs beam capabilities and spending time on there. Love the language.

keithnoizu | 7 years ago

Because it makes me happy.. and OTP, Beam, Jose and team are amazing.

tmat | 7 years ago

How's LFE in comparison? I don't hear as much about it, but I suspect (don't know why), that its closer to Erlang, any comparison with Elixir?

didibus | 7 years ago
[deleted]
| 7 years ago