What does making a data structure immutable actually buy you, and what does it cost?

Answer it out loud before you open anything. The value of the flags below is in comparing them to what you actually said — including whether you named a cost, or only a principle.

The situation behind the question

A team has a Cart object mutated in place by fifteen call sites. A bug report says a discount is sometimes applied twice. Someone has proposed making Cart immutable, and someone else has objected that it will allocate too much.

What it is really testing

Whether the candidate can argue about immutability as a *reasoning* property rather than as a style preference, and whether they can price the cost honestly instead of dismissing the performance objection or capitulating to it.

Where the mechanism is taught