[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern
WordPress Trac
noreply at wordpress.org
Sun Sep 4 09:43:26 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:78 F J Kaiser]:
> That is ''well-architected'' as it is open for extension – without
constantly changing the access layer to the code base as soon as a new
object gets implemented.
Is your point that using `WP::get( '<global_state>' )` means that we could
easily add any new global state we wanted without having to modify the
`WP` class?
If so, do you believe that making it easy to add global state to an
application is a virtue? Especially when you can do so without any point
in the source code where people who know to go and look for documentation
about your newly added global state?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:79>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list