Design Patterns · Middle · Question 67 of 75
What is "speculative generality"?
- ✓Correct answer: Abstractions, parameters and hooks added "in case we need them later" that nothing uses
- 2Guessing types instead of declaring them
- 3Running experiments in production
Explanation
Unused flexibility costs reading and maintenance time. Add it when a real second use case appears (YAGNI).