What is there not to like? I recently started learning Elixir, and so far I haven’t found any downsides.
It’s functional, concurrent, highly scalable, super stable, offers gazillion 9’s of reliability, has many built-in features like key/value store, pleasant Ruby-inspired syntax, a fast-growing number of libraries, awesomely welcoming community, great docs.
While Elixir may not be the best fit for every type of application, and I’m not abandoning Ruby anytime soon, it is a great language – that has a great market/audience fit.
Here are some of my favorite aspects of programming in Elixir coming from OOP programming in Ruby, that is winning me over. In fact, I like them so much, that I’ve started writing similar functional code in Ruby.
- Let is crash
- The whole language is built around an idea, that it is cheap to let a process crash and restart using a supervisor process. If you had to ever deal with silently crashing code before, you will appreciate this immensely.
- You deal with functions, not objects. Some people find to wrap their heads around it. But it’s not. Have you ever written something with a pipe operator in Linux shell? Where you passed the output of one command straight into another? Well, that’s pretty much it.
- This is a big deal if you ever head to handle state in your program. It simplifies reasoning about your program. You don’t have to worry anymore if your data structure got changed. Because you never change it in the first place. You make a copy and deal with a copy, in your next step.
- Familiar Ruby syntax
- Sometimes that can work against me as I’m reaching for some things, that are not in Elixir, but overall I found it very user-friendly.
Originally posted on Quora: Nick Gorbikoff’s answer to Why do people like Elixir