Erlang
Designed at Ericsson for telephone exchanges: lightweight processes, supervision, and fault tolerance.
31 steps across 1 tours, from the basics to complete programs.
The tours
- First released
- 1986
- Created by
- Joe Armstrong, Robert Virding, and Mike Williams at Ericsson
- Typing
- Dynamic, single-assignment; processes and messages are the language
- Snippets target
- OTP 28
- File extensions
- .erl, .hrl
What it is for
Erlang was built inside Ericsson's lab to program telephone switches — systems that must run for decades, survive hardware failures mid-call, and be upgraded without hanging up on anyone. Those requirements produced its famous answers: millions of lightweight processes sharing no memory, message passing as the only communication, 'let it crash' with supervisors restarting the fallen, and hot code loading in a live system. The AXD301 switch it shipped in reported nine nines of availability.
The BEAM virtual machine and the OTP libraries are the real product: gen_server, supervisors, and applications encode thirty years of building unstoppable systems into reusable behaviors. WhatsApp ran hundreds of millions of concurrent users on a famously small Erlang team; RabbitMQ, CouchDB, and much of the world's messaging infrastructure run on the BEAM, and Elixir brought a new generation onto the same runtime.
The language itself is small and odd in productive ways: variables assign once, pattern matching does the work assignment does elsewhere, function heads with guards replace if-ladders, and errors are ordinary data in ok/error tuples. Its syntax descends from Prolog — commas, semicolons, and full stops as separators — which reads strangely for a week and sensibly forever after.
Where it came from
Joe Armstrong, Robert Virding, and Mike Williams began Erlang in 1986 at Ericsson's Computer Science Laboratory, prototyping in Prolog to find the right shape for telecom software; the name honors Danish queueing theorist Agner Krarup Erlang (and, conveniently, ERicsson LANGuage). It shipped inside Ericsson products through the early 1990s, with the BEAM VM arriving in 1993.
In 1998 Ericsson, in a fit of single-vendor caution, banned Erlang for new projects — and open-sourced it on the way out. The team's OTP middleware went with it, and the ban became the language's liberation: the community formed, Armstrong's thesis codified the philosophy, and 'Programming Erlang' carried it to a generation of distributed-systems programmers.
The multicore era made its message-passing model suddenly mainstream: the BEAM scaled across cores while lock-based languages struggled, WhatsApp's 2014 acquisition made the case study famous, and Elixir (2012) gave the runtime a Ruby-flavored second audience. Ericsson still stewards OTP with annual releases; the 2019 Erlang Ecosystem Foundation now carries the community side.
What it is like to type
Erlang types like Prolog wearing a hard hat: Variables in UpperCamel, atoms in lowercase, and the trio of separators — comma between expressions, semicolon between clauses, full stop to end — doing what braces do elsewhere. Pattern matching is constant typing: tuples in braces, cons cells as [H | T], and the arrow -> landing after every clause head. The characteristic clusters are io:format with its tilde directives, module:function calls with colons, and ! for send. Punctuation-dense, but rhythmic once the clause shape settles into the fingers.
31 steps across 1 tours, from the basics to complete programs.