|
|
|
|
|
by acdha
2066 days ago
|
|
> It was because every developer in the West was taught that inheritance based OOP was the one thing to rule them all.
>
> And that unfortunate school of thought created the Java mythos that spread to many languages, not only PHP, eg JavaScript (everyone trying to write inheritance based OOP in a prototype based language) I don't think it's as simple as OOP being bad but rather the culture of complexity that everything had to have deep object hierarchies, layers of indirection and runtime configuration, etc. If you write Python, JavaScript, PHP, etc. classes which don't try to follow the enterprise Java style and only pay for the complexity needed by the problem domain the results are fine. I think a large part of it was that many people learned not OOP but how the Java standard library and J2EE worked, and internalized the idea that you were trying to produce a reusable abstraction for the entire stack which could be used by unrelated projects without realizing how expensive that kind general framework development is. |
|
What I was trying to say was that the inheritance based OOP was sold as the ultimate problem solver.
We all remember programming classes with Hello World like examples of Cat inherits from Animal.
Problem is of course that in the real world is never that simple so the inheritance based model turned out many times to be a mess because it was applied to problems where it didn’t fit.
That doesn’t mean that inheritance based OOP has its place, it does, but that is usually in very specific domains.