Elixir
A functional language on the Erlang virtual machine, used for concurrent, fault-tolerant systems.
27 steps across 1 tours, from the basics to complete programs.
The tours
- First released
- 2011
- Created by
- Jose Valim
- Typing
- Dynamic and strong; a set-theoretic type checker is growing in at compile time
- Snippets target
- 1.20
- File extensions
- .ex, .exs
What it is for
Elixir runs on the Erlang virtual machine, the runtime Ericsson built for telephone switches that are not allowed to stop. Everything the platform is famous for — millions of lightweight processes, message passing instead of shared memory, supervisors that restart what crashes — comes free, and Elixir wraps it in syntax a Ruby programmer can read on day one. Discord held millions of concurrent users on it; the pitch is soft real-time systems that stay up.
The language is immutable data plus pattern matching, all the way down. Function heads match on shape, {:ok, value} and {:error, reason} tuples thread through with chains, and the pipe operator |> turns nested calls into a left-to-right story. Macros mean much of the language is written in itself, and the tooling — mix, hex, ExUnit, a formatter in the box — arrived polished years before most rivals.
Phoenix is the reason many people show up: a web framework whose LiveView renders interactive pages from the server with no hand-written JavaScript, riding one cheap process per connected browser. The same trick powers Nerves on embedded hardware and Livebook for computational notebooks. It is a small job market next to Python's, but teams that ship Elixir tend to keep shipping it.
Where it came from
The foundation is Erlang, designed at Ericsson in 1986 by Joe Armstrong, Robert Virding, and Mike Williams to run telecom switches through software upgrades, hardware failures, and decades of uptime. Its AXD301 switch became the legend: reported availability with so many nines that the phrase nine nines still follows the VM around.
Jose Valim, then a Ruby on Rails core team member, hit Ruby's concurrency wall and went looking at other runtimes. He released Elixir in 2011: Erlang's machine and semantics, approachable syntax, real metaprogramming, and first-class documentation. Version 1.0 landed in 2014 with a compatibility promise the language has kept since.
Phoenix (1.0 in 2015) gave Elixir its flagship, and LiveView (2019) gave it a feature other stacks spent years imitating. Since 2022 Valim's team and CNRS researchers have been building a set-theoretic gradual type system straight into the compiler, shipping piece by piece in releases since 1.17 — typing the language without forking it.
What it is like to type
Elixir types in short bursts of symbols between readable words: |> opens most pipeline lines, &1 and fn -> end build functions, #{} drops expressions into strings, and :atoms follow a colon. Blocks close with a bare end instead of braces, so lines end clean. Identifiers are snake_case with ? and ! endings on the spicy ones, modules are CamelCase, and = asks the shift key for pattern after pattern.
27 steps across 1 tours, from the basics to complete programs.