Erlang Programming Language

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.

Core Architectural Pillars

1. The Actor Model

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).

2. Fault Tolerance and Supervision

Erlang systems are structured as supervision trees.

3. Functional and Immutable

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.

4. The BEAM Virtual Machine

The BEAM (Bogdan's Erlang Abstract Machine) is the virtual machine that executes Erlang bytecode. It is optimized for:

Distributed Erlang

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.

Legacy and Influence

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.

See Also