Why SRP Is Wrong: The Cardinality Error in the Single Responsibility Principle
The Single Responsibility Principle (SRP) — a class or module should have “one, and only one, reason to change” — is false as stated by Martin. Not imprecise, not context-dependent, not merely misunderstood: it is contradicted by a concrete counterexample under Martin’s own interpretation of his terms. We exhibit this counterexample: the adapter pattern. An adapter mediates between two domains with incompatible interfaces, and therefore has two distinct reasons to change under Martin’s own interpretation of his terms — one when the target interface changes, one when the adaptee interface changes. Under Martin’s criterion for counting reasons to change, these are two distinct reasons. The adapter violates SRP, and SRP’s prescribed remedy (splitting the adapter into sub-modules each with one reason to change) cannot simultaneously achieve SRP compliance and preserve the adapter’s function. Mediation requires both domains’ knowledge to be present in the same reasoning step; any attempted split leaves the multi-driver dependency in a different module or destroys the mapping. Therefore SRP, as stated by Martin, is false. The refutation does not depend on the choice of adapter. Any module whose purpose is to mediate between independent domains is equally a counterexample.
Authors
- Yannick Loth
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-05-27
- DOI
- https://doi.org/10.5281/zenodo.20415655
- Primary Topic
- Advanced Software Engineering Methodologies
- Type
- preprint