Immutability (DDD)
← Back to Value Objects
Value objects cannot be changed after creation. To represent a new value, create a new instance. Immutability simplifies reasoning, enables safe sharing, and eliminates aliasing bugs.
← Back to Value Objects
Value objects cannot be changed after creation. To represent a new value, create a new instance. Immutability simplifies reasoning, enables safe sharing, and eliminates aliasing bugs.