3 ms·
Inheritance is a kind of implicit adapter pattern -- instead of implementing a (complex or low-level) interface directly, you can implement a slightly simpler o
by Twisol 6y ago
Inheritance is a kind of implicit adapter pattern -- instead of implementing a (complex or low-level) interface directly, you can implement a slightly simpler or better-tuned interface, and the inheritance machinery takes care of adapting that interface to the one you ultimately need.
When used in that context, it's truly excellent. I suspect your example from Django fits this pretty well. But it's far too easy to abuse for general code reuse, which is a deep and alluring tar pit.