s whenever
practical. They should hold no matter what the client does, modulo
explicit opt-outs. Depending on the kind of invariant, this can be
achieved through a combination of static and dynamic enforcement, as
described below.</p>

<h4 id='static-enforcement' class='section-header'><a href='#static-enforcement'>Static enforcement:</a></h4>
<p>Guaranteeing invariants almost always requires <em>hiding</em>,
i.e. preventing the client from directly accessing or modifying
internal data.</p>

<p>For example,