Learning a new language (and a new paradigm: functional programming) can be a lot to take on. That’s why I thought I’d write a short post on why learning Elixir would be a valuable use of your time. In particular, I will go over the various strengths that the Elixir ecosystem has as well as some major benefits. Let’s start with reliability.
I was recently watching a video by Jonathan Blow (the game developer) and he mentioned how there used to be a concept in tech called “five nines”. What that meant was that a particular service would be “available” (for some definition of the word) 99.999% of the time. Elixir can help you to achieve these numbers using something in the language known as “supervision trees”. Basically what this means is that, if Elixir encounters some error situation, it can simply crash the process and expect the process’s supervisor to either restart the process or handle the crash in an appropriate way. This means that, effectively, if you program things correctly, your application will have very little “downtime”. As you can imagine, this does wonders for your app and is a big reason to learn and use Elixir.
Next, let’s look at parallelization.
Next, let’s look at extensibility.
If you’ve programmed in a Lisp (or a C derivative) before, you may be familiar with the concept of a macro. A macro is essentially code that writes code. The reason I mentioned Lisp is that Elixir, though it can look similar to Ruby, actually makes use of macros internally. Essentially, Elixir code only looks like Ruby because it uses some syntactic sugar to hide its Lisp-like structures. I won’t go into too much detail here, but if you are really curious about this aspect of Elixir, I would give Chris McCord’s book, “Metaprogramming Elixir” a read.
So those are some of the benefits of learning and using Elixir. If you enjoyed this post, feel free to Buy Me a Coffee. Your support helps to offset the cost of running this site and never goes unappreciated.
Thanks for reading!