Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Ok, this is what I was trying to say in my sibling post, but without the snark and including the why.


> 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.


Encapsulation/access control and static type checking are great features, but you can have them without implementation inheritance.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: