Erlang is a general-purpose, concurrent, functional programming language and runtime system. It was designed by Joe Armstrong, Robert Virding, and Mike Williams at Ericsson in the mid-1980s specifically for the demands of large-scale telephony systems.
The core philosophy of Erlang is expressed in the phrase "Let it crash," which emphasizes building systems that can recover gracefully from errors rather than trying to prevent them entirely through complex defensive coding.
In Erlang, every unit of computation is a process. These are not OS-level processes, but extremely lightweight "green threads" managed by the Erlang VM (BEAM).
Erlang systems are structured as supervision trees.
Erlang is a functional language where variables are immutable. Once a value is bound to a name, it cannot be changed. This eliminates entire classes of bugs related to shared mutable state and makes reasoning about concurrent code significantly easier.
The BEAM (Bogdan's Erlang Abstract Machine) is the virtual machine that executes Erlang bytecode. It is optimized for:
Distribution is a first-class citizen in Erlang. Message passing works identically whether the target process is on the local node or a remote node across a network. This makes it straightforward to scale applications horizontally and build distributed databases like Riak or messaging brokers like RabbitMQ.
Erlang's success in building reliable systems (such as the WhatsApp backend, which famously handled billions of messages with a small engineering team) has influenced many modern languages and frameworks.