CMP.16:4.1 - Recover the behavior and the freedom to change its construction
State what a recipient must observe or do with the result. Include consequential continuations: a value may later be updated, an object traversed, a description interpreted, or an event acknowledged. Distinguish a finite answer from continuing behavior. For a continuing computation, state what must always hold and what response must eventually occur under which environmental assumptions.
Recover the admitted cases and the available operations through C.29.2. Separate required behavior from an inherited implementation choice. A requirement to preserve order does not require an array; a capacity limit does not necessarily require exposing a mutable counter. Conversely, a physical coupling, a particular external format or an existing client’s observation can be binding. Do not change those requirements merely to make the preferred construction easier.
Begin with a whole use that exposes the difficulty. If several uses are promised, determine which must succeed together, which may be served independently and what results or resources they share. Hold a proposed unit fixed and change an allowed input, continuation or interaction that could change one of those uses. Keep distinctions whose loss would change the required observation or prevent its timely production. A direct argument covering the uses can already settle the choice. If a proposed change would answer a different question, return that difference to the receiver.