3 ms·
This is my thought as well. There are still good reasons for using inheritance. In the right use cases, overloading methods can be a life saver. But generally,
by deepsquirrelnet 5y ago
This is my thought as well. There are still good reasons for using inheritance. In the right use cases, overloading methods can be a life saver. But generally, I have gravitated away from using those patterns, and toward things like composition, which are simpler and seem to be much less fragile.
Recently, I've enjoyed the simple utility of python's functools library. Small-inheritance-like functionality seems to find a happy medium in a lot of cases, while avoiding a lot of unnecessary abstraction and boilerplate.