Vol. I a living index of named laws · est. mmxxvi no ads · no account
The Law Tomeindex of named laws

Is The Single Responsibility Principle real?

rated Heuristic

It is a rule of thumb, not a finding. It is useful and widely relied on, but it was never established by measurement and does not claim to be. The Single Responsibility Principle is rated Heuristic in this index. Its name is occasionally printed in English books, among the 903 whose print frequency can be measured, so this is a question people are actually asking.

The Single Responsibility Principle says: There should never be more than one reason for a class to change. 2 sources sit behind the Heuristic rating, 1 of them primary. Below: how far that goes in the entry's own words, and how it compares with the 1,116 entries around it.

Occasionally printed in printed books, of 903 measured names. The others in this band
33 of 69 entries in software & systems rest on something other than measurement, 48% of the field
45% of all 1,116 entries in the index are rated the same way. The best-known are the least likely to rest on measurement

Heuristic a dependable rule of thumb, not a proven theorem

Where it runs out

'One reason to change' cannot be decided from the code, only from a forecast of what the organisation will ask for next, and that forecast is exactly what nobody has. The principle also has no natural stopping point: taken to its limit it produces a class per method, a design its own advocates reject but the wording does not exclude. Martin later reformulated it around actors rather than reasons partly because the original phrasing was so widely read as a licence to fragment.

What people get wrong about it

It does not say a class should do only one thing, and it is not a rule about size. A large class with one reason to change satisfies it; a three-line class serving two masters does not. It is also not an argument against classes that coordinate several collaborators — coordination can itself be the single responsibility.

What the claim rests on

  1. Martin, R. C. (2000). "Design Principles and Design Patterns." — the principle as first collected, with the payroll example. primary
  2. "SOLID." Wikipedia — the canonical wording, 'there should never be more than one reason for a class to change', and its place in the set. secondary

Read the full entry on The Single Responsibility Principle

About this verdict

So is The Single Responsibility Principle real or not?

It is a rule of thumb, not a finding. It is useful and widely relied on, but it was never established by measurement and does not claim to be. This index does not rule on truth; it records what kind of support a claim has. Heuristic means a dependable rule of thumb, not a proven theorem. The four ratings in full.

Who decides the rating?

We do, and that is the softest part of this whole index. It is stated on the page that makes the argument rather than buried. The rating is applied against a published scale, the entry's own limits are quoted rather than summarised, and every source is linked so you can disagree with us from the same evidence.

Where is the rest of it?

The full entry has what the idea says, where it came from, how it works, worked examples and what it is often confused with. This page is only the evidence question. Every entry rated the same way is on the Heuristic list.