We need to talk about Elixir
Table of Contents
In 2016, I heard about a new programming language called Elixir for the first time. I remember that I bought a Programming in Elixir 1.3 and got fascinated by how succinct the syntax was and how approachable functional programming would be (yes, I tried and failed to understand Clojure and got just a fraction of Scala earlier).
Later, my career got into solutions architecture and cloud computing, and I left that book in my Kindle archive.
More recently, testing and adopting AI coding agents, I got surprised by AutoCodeBench results, showing remarkably great results with Elixir, despite being a “niche” language if compared with Python or JavaScript/TypeScript training corpus. Then I found an OpenAI repository called Symphony that contains a very well-crafted SPEC.md file and a reference implementation in… Elixir.
Why?
I started thinking why a language that is not popular is so strong on AI-assisted coding. Could be because of the ratio of really well crafted code vs. poorly written code in the open? Anything intrinsic with immutability by default? What about its much more cohesive ecosystem with a single build tool, a single package manager, and a single testing framework? Oh, wait, all those packages with less than 1K starts on GitHub having absolutely great documentation?
With current LLMs getting Elixir right on the first pass more than other programming languages, it will not be a surprise if we start seeing more Elixir code in the world –– and also seeing other language ecosystems investing in initiatives that made Elixir great for this new era of software development.
Back to my question, the answer I found for Why Elixir is so good for AI-assisted coding? is: All above. And more.
Challenges of Distributed Systems
In addition to all the language ergonomics that are great for humans (and LLMs), there’s an additional characteristic of Elixir that may be even more compelling in this world where most of the code will be written by AI: distributed systems patterns are built-in into the BEAM virtual machine, without needing additional dependencies. The potential drift between local and production feedback loops is dramatically reduced. Message passing between processes (BEAM processes, by the way) works pretty much the same if they’re local to your development machine or traversing multiple datacenters in production.
How about AI agents?
Elixir has a primitive called Agent. They also have Supervisor. And GenServer. How about building AI agents on top of Elixir? Is that a good idea? Absolutely!
In a world where there’s an abundance of software and they’re increasingly generated by non-deterministic LLMs, it’s refreshing to see Elixir (and more importantly its community) emerging as one of the greatest tools for the job after investing in the right primitives consistently since 2012.