Support » Requests and Feedback » OOP programming

  • I would like to see the coding changed to OOP (Object Oriented Programming). The use of globals makes
    it hard to name variables. Perhaps put globals in the database. The use of globals was done in the Fortran
    days. Happy programming. Looking forward to the next revision and new features.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Speaking as a Luddite, I will abandon WordPress in a flash if OOP is introduced.
    Well, actually, I’d just never upgarde.

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

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

    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).

    Moderator Matt Mullenweg



    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘OOP programming’ is closed to new replies.