[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern

WordPress Trac noreply at wordpress.org
Thu Sep 1 19:02:16 UTC 2016


#37699: Death to Globals Episode #1: A Registry, A Pattern
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.7
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------

Comment (by MikeSchinkel):

 Replying to [comment:64 wonderboymusic]:
 > Any content store is going to return `mixed`:

 That is exactly my point. Which is why I am stating that it would not be a
 good idea to follow that pattern where we do not have to.  Clearly for
 caching we pretty much have to handle any type, but we do not have to for
 things that are set-in-stone like `wpdb`.

 Minimally I'd argue for both, but I'd prefer that well-known properties
 just have a ''"get"'' and ''"set"'' method ''(where the get method omits
 the `get_` prefix because it is really not needed and just makes code that
 uses it look more cluttered, especially to non-professional developers
 such as site builders, custom theme developers and often custom plugin
 developers.)''

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:68>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list