Programming language design
Value semantics
E.g. Swift:
Many references to one variable.
- In Python: Reference semantics. Defensive copies ⇒ clone with bad performance
- In Swift: Value semantics. Copy on write. Only one reference ⇒ in-place update.
- In Java: Immutable strings. Also in functional languages. Safe, but expensive.