In this post I am going to explain my journey and reasoning for going back to Elixir. You might be wondering why did I leave Elixir in the first place, and where did I go in the meantime?
About 2 years ago I was quite an avid Elixir fan. All the stereotypes applied. Elixir was the greatest thing ever. Networking, concurrency, blah blah. I had my opinions, and no one could convince me otherwise. There were a few things brewing in my mind that I have kept today. One of them is the interest, or even requirement, to use lightweight programming languages. Ruby, Python, Java are no longer usable for me because of their resource usage. Elixir has this great advantage of being lightweight. One of the apps that really made this difference clear to me was Pleroma in contrast to Mastodon. However, there are other languages that meet this requirement. Golang, Rust, and even Erlang.
Golang really caught my eye with its boring simplicity. I definitely like knowing how each and every part of the app works, so Golang's web style really suited my personality. However, after building some apps with Golang, I don't feel like there is anything making me stick with the language. Since it is so lego like, I find that everyone uses Golang in their own way, and it becomes a bit confusing. There are also times where I would like a bit more power or structure. Also, I still have no idea how modules work in Go.
Rust was what really made me forget Elixir for a while. It was high level, and simply faster. Rust has a lot of power. However, the drawbacks of Rust started coming apparent after I got over the initial learning curve. Rust keeps changing the idioms, and I'm not the only person to complain about this. Also, people use ridiculously complex features for really simple things. I don't want to have to make type conversions for every operation I do. Also, there is no web server in Rust that has really taken off. Rocket is still on nightly even though it has been around for several years. Actix doesn't even use actors anymore... Diesel is okay, but the error messages are absolutely horrific.
Then one night I had the sudden urge to program in Erlang. I had given it a try before, but didn't take it too seriously. Honestly, with the addition of rebar3 and adding maps. Erlang had a lot of the aspects that I liked about Elixir, but felt simpler and more straightforward. Without a doubt, Erlang is a simpler language than Elixir. When using Elixir I felt like I had to use Erlang all the time, so I might as well use it. The cowboy server is well documented and easy to use. Unfortunately, in terms of ecosystem, the niceties stop there. Not everyone in the Erlang community uses rebar. Which seems cool until you are staring at a several hundred line Makefile. I really tried to give Erlang a fair shot, and did enjoy it for the most part. What eventually broke me was when I went to deploy my app and some of the dependencies like erlydtl that needed external templates simply didn't work. This was frustrating and I finally got tired of feeling like I was swimming upstream. The Elixir web ecosystem has simply left Erlang's in the dust. For good reason, the Phoenix team is really smart, dedicated, and let's not forget well funded. Even Erlang Solutions has switched over to using Elixir as its default language.
So now I'm coming back to Elixir for the same reason I left it. Phoenix. What happened? Well in my two year journey of minimalist web frameworks and different languages I learned some valuable lessons. Minimalist web frameworks are a nice idea. In my experience, what ends up happening is that by the end of it you have all the dependencies and structures of the high level frameworks like Phoenix. I kept finding that I was circling back to where I started. To Phoenix's credit, it is good at letting you choose only what you need. So instead of relearning the wheel over and over again, I plan on learning and becoming an expert in Phoenix. We'll see if I stick to it.
Content for this site is CC-BY-SA.