(no title)
fetbaffe | 5 years ago
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).
Few years ago the mythos changed somewhat to every programming language should be functional.
Thus it is not a specific PHP problem, it is common problem of trend sensitivity in programming culture.
And the funny thing is that much of the critique against PHP, like in this thread, is in the form of "why isn’t PHP like the other programming languages?"
But agree PHP should go it’s own way, it has much to contribute to the world still and it feels like it has started to create its own path again.
acdha|5 years ago
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.
fetbaffe|5 years ago
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.