On this page

0007. Observational immutability with scoped arenas

Context

Immutable values make programs easier for models and tools to reason about, and make replay and parallelism safe. Naive immutability copies too much; a tracing garbage collector costs latency, memory and startup time.

Decision

Alternatives considered

Consequences

Escape analysis and promotion reports become compiler features (M5.2). Patterns that rely on long-lived shared mutable state use tables and typed IDs instead.