Goodbye, Object Oriented Programming
Charles Scalfani
4.97K314

About the inheritance problem overriding extended methods is a feature not a bug. In some case you want to redefine one method used by a method from the mother class.
I do it when using Template method pattern. It is rather useful. What is the functional equivalent of you base class example ?
The solution would be to use a lib without oo paradigm I think. But the problem stays here. If someone modifies the lib (as someone modified the base class) you will have the exact same problem. That’s why unit testing comes handy.

About the encapsulation problem. Can you provide an example ? I don’t really see the problem. If I understood correctly you have an object, you pass it to another object that will save it as private field than
using the reference it is possible to edit the object ?
It’s not possible… so the problem is a performance problem induced by the encapsulation ? Bring some numbers please.

About the polymorphism, apparently there is no problem, it is just not necessary, ok then.

I am totally in favor of a debate about oo vs functional programming, but there you did not convinced me.

What is the size of your projects usually ? How many lines of code, entities ?