Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49506 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 884 invoked from network); 25 Aug 2010 06:59:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2010 06:59:00 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:60023] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/70-32120-33FB47C4 for ; Wed, 25 Aug 2010 02:58:59 -0400 Received: by qwb8 with SMTP id 8so216407qwb.29 for ; Tue, 24 Aug 2010 23:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Os6KvIZTWYShEXmim+s0l87TWC6F6nHFEIMefO/jx7A=; b=hDU26nW0dh1Qvi961SI6J4Tu32rDJFycgul9JmIdMD7X85vpyCoaKcS0rywTrmlQNq PVhkmlwKDjnSjbsnak6NAm5hqXSsNM1RXSMKUYo6iMwZ9EAb63BK4iSN+3PQ0p4ArjnY AOBs6GU6vI98AolSmKE4moBGfx8bIPymp8rX8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=f+1FVblIkw9YRcKhUxQ7d4SAUT87+GZocUkw+bScDG5NPhjCf4IFAiB2jFjaPnWtxa pDYEa8ZUwneOfesKYbm7LWz20jlpOedqJJCu2P7WdSfzbL/5m+iPIVtvBx+EObQQVsOf PGZfkjNZfrti5dCZwSl2K0uPZe8ulYkf1PKzE= MIME-Version: 1.0 Received: by 10.220.200.194 with SMTP id ex2mr2826004vcb.0.1282719536081; Tue, 24 Aug 2010 23:58:56 -0700 (PDT) Sender: tjerk.meesters@gmail.com Received: by 10.220.50.165 with HTTP; Tue, 24 Aug 2010 23:58:55 -0700 (PDT) In-Reply-To: <4C74B692.2010609@lsces.co.uk> References: <1282674464.3333.119.camel@guybrush> <4C74B692.2010609@lsces.co.uk> Date: Wed, 25 Aug 2010 14:58:55 +0800 X-Google-Sender-Auth: ZBQv8fQRM4GIOU7c1zygNBPxOsw Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [PATCH] #52563: Adding E_NONE and/or E_EVERYTHING constants From: datibbaw@php.net (Tjerk Anne Meesters) On Wed, Aug 25, 2010 at 2:22 PM, Lester Caine wrote: > Johannes Schl=FCter 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 che= ck > 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=3Dcontact > 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 > > --=20 -- Tjerk