The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

OOP programming (5 posts)

  1. redneck
    Posted 12 years ago #

    Speaking as a Luddite, I will abandon WordPress in a flash if OOP is introduced.
    Well, actually, I'd just never upgarde.

  2. michelv
    Posted 12 years ago #

    redneck, may we know why?
    As a user, it wouldn't really change anything...

  3. redneck
    Posted 12 years ago #

    I'm a terrible Luddite and could never get my head around OOP.

  4. Stevarino
    Posted 12 years ago #

    I believe the developers' stance is to make the backend more object oriented (in the nightlies check out $wpdb and $wp_posts), but to only use simple functions for end-users and template editors.
    It's a bit more work for the developers, but everyone is happy in the end. The non-coders get a simple syntax while the hackers, plugin-authors, and developers get the clean object-oriented code. :)
    And tsbalaban: if you're complaining about namespace conflicts with your own created variables, wouldn't that mean that you yourself are coding in the global namespace (and therefore guilty of your own criticism)? Why not use classes for your own code? What most authors do is add a prefix to their global variables. Any global variables and constants I declare are appended with "soc_" (at least I try for this).

  5. Matt Mullenweg
    Posted 12 years ago #

    There's a fine balance between having things programatically pure and making it easy for someone new to the code to understand what's going on. We're committed to making the code faster and smaller with every release, which means things get refactored all the time, though not necessarily in a OOP fashion. I think for a relatively small program like WordPress a combination of the two is the best approach.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.