Description #
Erlang is a functional, concurrent programming language designed for building scalable and fault-tolerant systems. It excels in soft real-time, distributed applications—especially in telecommunications, messaging systems, and databases.
History #
Erlang was developed by Ericsson in the 1980s and released as open-source in 1998. Originally intended to power telecom systems, Erlang’s lightweight processes and message-passing model became a model for concurrent system design. It runs on the BEAM virtual machine.
Hello World Code #
erlangCopyEdit-module(hello).
-export([start/0]).
start() ->
io:format("Hello, World!~n").
How to Run #
Option 1: Online
Option 2: Local
- Install Erlang:
sudo apt install erlang
Save as hello.erl
and run in the Erlang shell:
erlc hello.erl
erl -noshell -s hello start -s init stop
Key Concepts #
- Functional concurrency
- Actor model with lightweight processes
- Immutable data
- Pattern matching
- Hot code swapping (runtime updates)
- Distributed system support
- Fault-tolerance and supervision trees
- Message passing between processes
- BEAM virtual machine
- Low-latency, real-time performance
Try It Online #
Fun Facts #
- WhatsApp uses Erlang to handle millions of simultaneous users.
- The BEAM VM was built to never crash—only restart cleanly.
- Erlang powers telecom switches with “9 nines” of reliability (99.9999999%).