3 ms·
> I'm not sure what's so special about overwriting methods here. There are many cases where semantics can break as a dependency changes. The problem with imple
by zozbot234 6y ago
> I'm not sure what's so special about overwriting methods here. There are many cases where semantics can break as a dependency changes.
The problem with implementation inheritance specifically is that there is no single responsibility for establishing this semantics. Every method call on overridable methods incurs a dispatch step involving the whole of an arbitrarily extensible inheritance hierarchy, and every method can be called by an unknown extent of user code. You just can't give a proper semantics to it without looking at the whole-program level, which is antithetical to modularity.