On Wed, Aug 25, 2010 at 2:22 PM, Lester Caine <[email protected]> wrote: > Johannes Schlüter wrote: >> >> On Tue, 2010-08-24 at 18:49 +0800, Adam Harvey wrote: >>> >>> Johannes has pointed out on IRC that E_NONE does already exist in some >>> projects, so that's an argument against it. >> >> Yeah, I did a quick code search, which gave some results defining a >> constant with that name. This means adding this in 5.3 would be a >> annoyance and upgrading from X.Y.(Z-1) to X.Y.Z should be a no >> brainer ... on the other hand the fact that people are defining such a >> constant and the bug report show that there is some need. >> >> I myself don't see a point in a constant for an empty bit mask. As an >> empty bit mask means 0 ... on the other hand it doesn't cost us much. >> >> So, I'm +/- 0 on this for trunk. > > 'a quick code search' for '0' is not going to produce anything sensible, > while a quick code search for 'E_NONE' will (in theory) pick up all the > places where that particular setting is used. So there IS some sensible > reason to add 'pointless' constants. The problem is - it only works if > people DO use it consistently ...
How many times do the E_XX constants appear without 'error_reporting' next to it? > > Given that many people are not used to the maze of code, improving > navigability by adding consistent 'pointless' constants could potentially > help a lot, even if the constant is simply added as a comment where a check > for 0 does not actually need the value? I honestly see more value in the E_EVERYTHING than the E_NONE simply because -1 seems to be more "magical" than 0; the fact that 'all' and 'everything' would mean different things is ... regrettable ;-) > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=contact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk// > Firebird - http://www.firebirdsql.org/index.php > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- Tjerk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
