Immutability is the property that a value cannot be changed after it has been created. Instead of overwriting an existing value in place, an immutable style produces a new value that reflects the desired change, leaving the original untouched. This stands in contrast to the mutable assignment found in imperative programming, where a variable’s contents can be modified at any point.
In purely functional languages this is the default. The Haskell 2010 Language Report defines Haskell as “a general purpose, purely functional programming language,” and in such a language ordinary bindings name fixed values rather than reusable storage cells. Where most programs would update a variable, a functional program instead constructs a fresh value and passes it along.
The motivation is described in “Structure and Interpretation of Computer Programs,” which contrasts the functional style of computing with one that introduces assignment and the idea of objects with changing state. Programs written without assignment are easier to reason about, because a name always refers to the same thing wherever it appears.
Immutability eliminates whole classes of bugs. When a value cannot change, two parts of a program cannot accidentally alter the same data through shared references, so problems of aliasing disappear. The same property is central to safe concurrency: if no thread can mutate shared data, there are no data races to guard against, which is why immutability underpins persistent data structures and much modern concurrent design.