3 ms·
PHP (and JavaScript for that matter) historically did not have a good implementation of OOP, nor a culture around it. As far as I know, things have changed on t
by romanhn 4y ago
PHP (and JavaScript for that matter) historically did not have a good implementation of OOP, nor a culture around it. As far as I know, things have changed on that front, but it certainly does not surprise me that you were able to deliver a PHP product without touching it.
Doesn't mean that you're dumb or that other people lost their minds. My guess is you haven't given it a serious go, which is fine if you don't have a need for it. I personally find OOP fantastic for large codebases with multiple people working on them. Makes code a lot more maintainable and easier to reason about. The downside is that folks without a strong sense of architecture can get carried away with enterprise patterns and end up with abstractions on top of unnecessary abstractions. The basic tenets of OOP should be easy to understand if you just spend some time on it, though benefits can be hard to see if you haven't experienced procedural spaghetti code.
- kbelder 4y agoI think JS had a perfectly reasonable and workable OOP implementation, actually pretty elegant, but so different from the C++/Java class paradigm that almost nobody used it the way it was supposed to be. Instead, JS Objects were treated like broken Java classes, which led to all sorts of problems.
- petre 4y agoIt's still hard to get the name of an object and use instanceof on it though. Ruby has the class and is_a? methods.