WordPress.org

Ready to get started?Download WordPress

Forums

OOP programming (5 posts)

  1. redneck
    Member
    Posted 9 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
    Member
    Posted 9 years ago #

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

  3. redneck
    Member
    Posted 9 years ago #

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

  4. Stevarino
    Member
    Posted 9 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
    Troublemaker
    Posted 9 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

Tags

No tags yet.