Will WordPress become completely OOP?

I can say with about 99.9999% certainty that WordPress will never become completely OOP in future version, not the least of which is that the topic has come up time and again on the wp-hackers list and the core team members has expressed no interest in doing so.

As I look at my personal experience with programming and teaching OOP starting around 1990 I agree with the core team and think complete OOP would be a mistake. Although I once an OOP zealot and thought OOP was a panacea I’ve since come to believe that it has its value in some contexts but in other contexts it gets in the way.

One of the biggest problems I’ve found with OOP is that it forces the developer to bake in structure long before the developer actually understands what that structure should be which then leads to the fragile base-class problem.

Of course for selected aspects of WordPress, OOP makes a lot of sense and if you study core you’ll find such classes; Widget, List_Tables (in 3.1), etc.

At this point I’m happy to work with WordPress in a mostly non-OOP paradigm and think that if it had been pure OOP WordPress would have never gained the following it has. Why? Because OOP would have raised the bar of complexity for would-be WordPress themers and plugin developers, and it would likely have resulted in an application that was not flexible enough to evolve as the core team learned more about the needs of its users over the past 6 years.

FWIW.

Leave a Comment