Some Thoughts on Elixir

I’ve been experimenting with Elixir for a few years off and on and have really enjoyed it so far. I can’t use it professionally, so all I’ve been able to do is some Exercism exercises (which I highly recommend) along with some other random projects. For example, I used it a fair bit to solve many of the Advent of Code 2022 puzzles (here’s a link to my repo of solutions).

I’m not sure that I’m ready to call myself an expert and definitely wouldn’t say it has replaced Ruby as my favorite language, but it has been fun so far. More than fun, actually; I’ve learned a lot and it has influenced how I write code in other languages. It isn’t just that it is a functional language; there are several other aspects that feel worth carrying along with me. I love Elixir’s pattern matching and while Ruby has introduced it, it isn’t quite as powerful as Elixir’s. I assign fewer variables now, instead favoring small functions that I can chain together (thanks to |> in Elixir). Tests in code comments — especially right above functions/methods, called Doctests — are amazing. I wish I could bring that with me to Ruby. Finally, I get why Elixirists refer to functions by their name and arity (like foo/2) and how different Elixir is from Ruby.

If you’ve thought about picking up another language, I would highly recommend Elixir. You’ll probably learn something new!