[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern
WordPress Trac
noreply at wordpress.org
Sun Sep 4 10:50:00 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 F J Kaiser):
Replying to [comment:79 MikeSchinkel]:
> Is your point that using `WP::get( '<global_state>' )` means that anyone
could easily add any new global state without having to modify the `WP`
class?
It seems you missed the point with the previous notes and comments about
the ''global state''. Does the first {{{WP_Registry}}} suffer from
accessing globals? Yes. But as others have pointed out already, there
should be ''no'' access to globals, but instances built, stacked and
returned – to get rid of the globals part as this is where this ticket has
its focus.
If you believe there is a need to discuss the community layer (for e.g.
barrier for entry level devs), IDE support or yes-nos for using patterns
in general further, I believe that Slack is a better route to address
this. Still ''briefly summed up results'' of such a discussion would make
a good fit in here. This ticket already is hard to follow and comes with a
1h+ reading experience, which raises the entry barrier for devs who would
like to participate up to a no-no level.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:80>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list