3 ms·
You get about as much reuse from a set of re-usable functions as you get from inheriting implementations. Though I grant that having an object hierarchy does m
by elcritch 1y ago
You get about as much reuse from a set of re-usable functions as you get from
inheriting implementations.
Though I grant that having an object hierarchy does make it a bit more explicit what’s being inherited or needs implementing. However, a OO hierarchy also tends to obscure the actual parent implementations as well. Just having a set of functions from a module generally lowers the number of indirections.
In general I find working through a non-OO code base generally easier to grok and understand. Especially the OP culture from Java or C# style OO, even if I’m generally good at understanding OO patterns.
- galangalalgol 1y agoOk, this is what I was trying to say in my sibling post, but without the snark and including the why.
- motorest 1y ago> You get about as much reuse from a set of re-usable functions as you get from inheriting implementations. There's far more to inheritance that code reuse. For example, encapsulation, access control, and static type checking, etc.
- zozbot234 1y agoEncapsulation/access control and static type checking are great features, but you can have them without implementation inheritance.