3 ms·
> NYCStyleCheesePizza > ChicagoStyleCheesePizza Chaining M by N adjectives together to form a type hierarchy is a design smell. Odds are, you just need to add
by humanrebar 9y ago
> NYCStyleCheesePizza
> ChicagoStyleCheesePizza
Chaining M by N adjectives together to form a type hierarchy is a design smell. Odds are, you just need to add 'toppings' and/or 'style' members to your structure.
But, to praise the Factory pattern, you can walk back your gratuitous class hierarchies if the concrete class name is an implementation detail of your code.