Speculative Generality
Readability should be weighed against mechanical rule-following when deciding whether to split a class. The goal of refactoring is balance rather than minimalism for its own sake. The goal is comprehensibility, not minimizing responsibilit…
2 sources - 7 claims
Readability should be weighed against mechanical rule-following when deciding whether to split a class. The goal of refactoring is balance rather than minimalism for its own sake. The goal is comprehensibility, not minimizing responsibilities per class at any cost. Speculative generality occurs when developers add abstractions or architectural structure for future requirements that may never happen. Speculative generality tends to make code harder to read and maintain instead of more practically flexible. Speculative generality serves developer ego or anxiety more than real user needs. Splitting classes too aggressively can create a codebase that is hard to follow.