[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern
WordPress Trac
noreply at wordpress.org
Mon Oct 10 07:01:43 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 schlessera):
I totally get that such changes should be properly evaluated, and the
Core-to-be-released is probably not the best place to run experiments...
However, I'd like to point out that the goal is not to improve first-time
readability (or to even maintain it), but to improve maintainability.
Globals like this are technical debt, and I agree that it might be easier
to read the code once when you just have them openly accessible like this.
It also means that you'll need to read that code in dozens of locations,
dozens of times, to get a clearer idea of whether you can make a change or
not.
Improving maintainability means that the code might be more complicated to
read the first time around. But you won't have to ponder over it for hours
to muster up the courage to make a change...
So, yes, I'm all for reverting and discussing how best to tackle this. But
we just needn't bother if "first-time readability" is seen as an absolute
priority...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:97>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list