[wp-trac] [WordPress Trac] #22251: Helper function to simplify checking for constants
WordPress Trac
noreply at wordpress.org
Tue Oct 23 21:51:54 UTC 2012
#22251: Helper function to simplify checking for constants
-------------------------+------------------------------
Reporter: evansolomon | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by MikeSchinkel):
Replying to [comment:17 alex-ye]:
> It might be a stupid question , but You worried a lot of the constants
count ?! Is it really bad ?! and You just suggestion to use class vars
instead of ?!
This is not about comment count, it is about making access easier i.e. so
that you don't first have to test for `if (defined('...'))`, and immutable
constants cause difficulty in scenarios such as unit testing and/or with
some plugin use-cases.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22251#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list