We may need objects to be identical if their internal states are the same. When modifying the state of an object, we are not expecting it to change its identity. Immutable objects avoid this completely.
Avoiding identity mutability
Get Swift Functional Programming - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.