3 ms·
Class hierarchies are OK when they have one level. It's essentially object oriented switch statatement with bells and whistles. I can't remember one class hier
by ajuc 13y ago
Class hierarchies are OK when they have one level. It's essentially object oriented switch statatement with bells and whistles.
I can't remember one class hierarchy more than one level deep that was worth it.
They save a little code - true, but at the cost of coupling, making it harder to change, and forcing early debatable decisions on programmer (which classification is more important and goes first for example).