Abstraction Consistency Principle
Updated 2026-08-15
Summary
The design rule that components at the same level of abstraction should stay at that level, without mixing highly concrete details with high-level concepts.
Definition
The principle holds that each layer of a system should operate at a single, consistent level of abstraction, with its own vocabulary and contracts, and that mixing granularities within one layer creates confusion and coupling. It is a corollary of separation of concerns and single responsibility, and it explains why abstraction leaks are so costly: a leak forces a caller to know about a level it should not. The qualification is that consistency must serve comprehension rather than hierarchy for its own sake, since an intermediate layer with no distinct concept adds indirection without clarity.
Introduction
How to use
- Fix the level: state the abstraction level of the unit you are writing before adding anything. - Expose contracts: have callers depend on the layer's own vocabulary rather than its internals. - Audit the leaks: search for cross-layer names, such as database columns surfacing in business logic.
Mechanism
A reader builds a mental model from consistent cues, so when every element in a layer operates at the same granularity, one model explains the whole layer. Mixing levels breaks that model, because the reader must switch between registers and cannot predict where the next detail will appear. Coupling follows: code that reaches across levels depends on internals it does not own, so any change below propagates upward. Keeping levels consistent confines change to one layer, which is why the discipline pays off as maintenance rather than as elegance.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- An API that exposes business capabilities rather than table columns lets storage be refactored without breaking clients.
- Separating a domain model from a persistence model prevents database concerns from shaping business rules.
Common pitfalls
- Mixing strategic discussion and byte-level detail in the same document or function, which forces constant register switching.
- Adding pass-through layers in the name of consistency, which increases indirection without adding clarity.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Abstraction_(computer_scienceverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS