2 ms·
More than just "in practice", it might be worse than copy/paste. Richard Gabriel nailed it in the 90s when he identified inheritance as a form of compression, n
by spopejoy 12y ago
More than just "in practice", it might be worse than copy/paste. Richard Gabriel nailed it in the 90s when he identified inheritance as a form of compression, not reuse, forcing the programmer to have to understand every class under inheritance to understand any part of it:
Compression is a little dangerous because it requires the programmer to
understand a fair amount about the context from which compressed code will
take its meaning. Not only does this require available source code or excellent
documentation, but the nature of inherited language also forces the programmer
to understand the source or documentation. If a programmer needs a lot of context
to understand a program he needs to extend, he may make mistake because
of misunderstandings.
(from Patterns in Software, which is a really deep if long-winded book)