Learn You Some Erlang for Great Good is the best way to learn Erlang. It’s targeted at people who already know a programming language (any) and want to learn more about FP and Erlang. The author really wants to understand it all. There is a separate huge chapter on recursion and thinking recursively, with lots of detailed examples. And the whole book is in the same manner: detailed, with examples, and real-world use cases. It goes from very basic syntax to standard library, concurrency patterns and solutions, testing, distribution and so on. If you ever got interested in Erlang, definitely start there.
Now, about Erlang as a language. Why would you learn it nowadays? Well, the language itself is a bit messy, the syntax is old and alienating, static type checking is bad (and so go-to-definition will often just shrug at you), and there are not so many vacancies for it. However, underneath it is hidden a gem:
- The best concurrency, distribution, and error handling.
- Ability to deploy a service that will be running for 40 years without any downtime and will never interrupt a single connection,
- Painless horizontal scaling until you have servers for it.
- No bug will ever make everything explode and will never go unnoticed.
- The best observability.
- Debugging right on production without any performance degradation.
This is why Elixir appeared. Elixir is a language that provides on top of it a friendly syntax, great metaprogramming, modern package management, logging, some additional distribution primitives. But underneath it lives Erlang and all the same patterns and behaviors.
So, it’s worth learning Elixir if you know the pain of distributed systems and want a tool that solves it. And it’s worth learning Erlang to know better how Elixir works inside.