Skip to content

Immutability

Data that cannot change after creation eliminates temporal coupling, enables safe sharing across threads, and makes program state reproducible.

Tension Addressed

Mutability vs. Immutability

Recognizable As

Persistent data structures, copy-on-write, event sourcing, value objects, frozen objects, const declarations

Canonical Sources

Chris Okasaki, "Purely Functional Data Structures" (1998); Rich Hickey, "The Value of Values" (2012); SICP (1985)

Transfers To

Concurrency (lock-free algorithms), Distributed Systems (CRDTs), Version Control (immutable commits), Database Design (append-only logs)

Sub-concepts: - Structural sharing: Efficient immutable updates via shared structure - Persistent data structures: Immutable structures preserving previous versions