Link to current text
CMP.12:8 - Common Anti-Patterns and How to Avoid Them
| Tempting move | Failure | Useful repair |
| Copy the implementation language’s defaults | The interpreted language acquires unintended arithmetic, scope or order. | Implement the source operation and its conditions explicitly. |
| Substitute names by spelling alone | A new binder captures an unrelated occurrence. | Preserve binding through fresh names, locations or scoped addresses. |
| Evaluate every child before choosing a branch | An unselected operation fails or produces an unwanted effect. | Compile the language’s conditional control. |
| Prove a stack fragment only from an empty stack | The result cannot justify embedding after another fragment. | Establish its effect above any admitted earlier stack. |
| Treat a timeout as a divergence result | A terminating run may simply require more steps. | Return suspension or use an applicable termination argument. |