3 ms·
Inheritance is usually really great when you want to extend the type outside the context it was created in. GUI is a very clear example of that where compositio
by arithma 9y ago
Inheritance is usually really great when you want to extend the type outside the context it was created in.
GUI is a very clear example of that where composition may work but is greatly tedious (reimplementing the whole interface, exposing it, and rewiring), and sum types are right off the bat inapplicable.