Avoiding identity mutability

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.

Get Swift Functional Programming - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.