Why Learn Erlang?

I am a Pythonista by trade and passion. It was the first language - after trying C, Java, and Perl - that made me feel productive while loving the (admittedly beginner-crappy) code I wrote. I don't claim to be a Python expert but I have worked with it long enough to be well versed in it for most use cases. And yet I feel like trying my hand at another language.

I have dithered on the decision to pick a language and stick with it. My interest has been pulled in three directions over the past couple years: Go, Erlang, and Rust. I even tried my hand at each language for a couple days before life happened.

The things I like about Go include a single static binary to deploy, really fast compile times, cross-building for other OSes, built-in concurrency, garbage collection, community hype, and rapid adoption by many projects.

Rust is compelling to me because it has first-class FFI support, functional programming-inspired things like pattern matching, friendly community, hype, manual memory management with safety, and Cargo. It is also low level enough to add lots more to my skills on top of my experience with dynamic languages.

These two languages complement my Python skills in different ways. Rust would be a great replacement for C to write performance-critical parts of a Python project. I'm just a little too overwhelmed with the idea of giving up dynamic typing and garbage collection. It's also too new to be available everywhere yet. This is especially important to me these days because I have taken up FreeBSD on ARM (Raspberry Pi) and Rust is not available there yet. I expressed some interest in getting it available but that's one Yak too many to shave. I want to get started with writing code, not getting a compiler ported to an OS and architecture that the main project has shown minimal interest in.

Go has the same problem. Just look at the Go build dashboard and you'll find failing builds of the compiler on FreeBSD ARM. Since I'm immersing myself in the BSD world I don't want to spend time getting the tools working on the OS before I can start learning the language. Of course, cross compiling to FreeBSD ARM from amd64 is possible and well supported but for my (whiny) purposes I need the compiler available on ARM as well.

Why don't I learn these languages on Mac OS X instead? Both have working compilers for that platform so I am not blocked. To be truly honest I really want something that is available natively on FreeBSD on Raspberry Pi because that is my main focus right now. This is a very subjective reason to not pick either but that's just the way it is for me.

Why Erlang then? First off, it's available on FreeBSD on ARM. There was no pkgng pre-built package for Raspberry Pi but I got it built and running from Ports in a couple hours. I can't do that with Go or Rust today.

Beyond that reason, I find learning a completely new paradigm - functional programming - very exciting. In my short time with it I got excited by all the features it provides and the philosophy it follows. Combining crash fast and recover, message based concurrency, immutable variables, portability, strong typing, and garbage collection in one ecosystem is unique. It even has a long history of running in mission-critical production environments on a large variety of hardware.

The way I see myself using Erlang - a very important question - is building distributed (maybe trivial but so what?) applications running on clusters of tiny ARM devices. Maybe my own Internet of Things (IoT) ecosystem in my homelab? Who knows? I haven't ever attempted anything this ambitious and I get all tingly thinking about it.

Eventually it all boils down to what I want to build and how I can build it. Not to mention how a particular set of technologies makes me feel. I have begun to subscribe to the philosophy of learning things that make you feel good; everything else is secondary. Erlang makes me feel good and that's why I am learning it before I learn Go or Rust.