# Erlang

> Erlang concurrent programming with OTP. Use for .erl files.

- Skill: `g1joshi/erlang` (Agent Skill)
- Install (CLI): `npx skillmds@latest add g1joshi/erlang`
- Raw SKILL.md: https://api.skillmd.com/api/skills/g1joshi/erlang/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: G1Joshi (https://skillmd.com/u/g1joshi)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/g1joshi/erlang

---


# Erlang

Erlang powered WhatsApp and the telecom backbone. OTP 27 (2024) adds a **JSON module** and triple-quoted strings. It is the foundation of Elixir.

## When to Use

- **99.9999999% Reliability**: Hot code reloading, supervision trees.
- **Massive Concurrency**: Lightweight processes (millions per node).
- **Distributed Systems**: Distributed Erlang nodes connect natively.

## Core Concepts

### OTP

Open Telecom Platform. Behaviors like `gen_server` (Generic Server).

### Let it Crash

Don't catch exceptions. Let the supervisor restart the process.

### Message Passing

`Pid ! Message`. No shared memory.

## Best Practices (2025)

**Do**:

- **Use `rebar3`**: The standard build tool.
- **Use `maybe`**: The new monadic-like flow control (enabled by default in 27).
- **Use `json`**: The new stdlib JSON parser (faster/safer).

**Don't**:

- **Don't optimize pre-maturely**: Profile first. Messages are copied.

## References

- [Erlang.org](https://www.erlang.org/)

