jargon

Design patterns·Objects, messages and the principles

adding a third colour to a hierarchy that already had four shapes meant writing twelve classes instead of one.

Subclass explosion

Also calledclass explosion, combinatorial subclassing

What happens when two independent axes of variation are both expressed as inheritance: the number of classes becomes the product rather than the sum. It is the specific pain the bridge pattern exists to remove, and the strategy and decorator patterns are variations on the same escape — turn one of the axes into a field instead of a subclass. Recognising it early is the difference between four classes and forty.

Commonly confused with