Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50138 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98099 invoked from network); 11 Nov 2010 02:30:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2010 02:30:31 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 76.96.30.24 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 76.96.30.24 qmta02.emeryville.ca.mail.comcast.net Received: from [76.96.30.24] ([76.96.30.24:37902] helo=qmta02.emeryville.ca.mail.comcast.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/00-32123-D355BDC4 for ; Wed, 10 Nov 2010 21:30:22 -0500 Received: from omta19.emeryville.ca.mail.comcast.net ([76.96.30.76]) by qmta02.emeryville.ca.mail.comcast.net with comcast id VWl71f0061eYJf8A2eVHQc; Thu, 11 Nov 2010 02:29:17 +0000 Received: from earth.ufp ([98.220.236.211]) by omta19.emeryville.ca.mail.comcast.net with comcast id VeVG1f00H4aLjBW01eVGxs; Thu, 11 Nov 2010 02:29:17 +0000 Received: from localhost (localhost [127.0.0.1]) by earth.ufp (Postfix) with ESMTP id 2BD9DD7A16 for ; Wed, 10 Nov 2010 20:29:16 -0600 (CST) Received: from earth.ufp ([127.0.0.1]) by localhost (earth.ufp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Je1NdHe3oROh for ; Wed, 10 Nov 2010 20:29:16 -0600 (CST) Received: from linux-nkec.site (unknown [192.168.42.1]) by earth.ufp (Postfix) with ESMTPSA id 1235BD7A11 for ; Wed, 10 Nov 2010 20:29:16 -0600 (CST) To: internals@lists.php.net Date: Wed, 10 Nov 2010 20:29:49 -0600 User-Agent: KMail/1.13.5 (Linux/2.6.34.7-0.5-desktop; KDE/4.4.4; x86_64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <201011102029.49703.larry@garfieldtech.com> Subject: Re: [PHP-DEV] Supporting Binary Notation for Integers From: larry@garfieldtech.com (Larry Garfield) On Wednesday, November 10, 2010 5:46:50 pm Matthew Fonda wrote: > On Wed, Nov 10, 2010 at 2:51 PM, Gustavo Lopes wrote: > > On Wed, 10 Nov 2010 21:31:19 -0000, Jonah H. Harris > > > > > > wrote: > >> Hey all, > >> > >> I was recently working on some code which made use of bit arrays and I > >> came across feature request 50648: Format for binary numbers. While > >> it's just > >> more syntactic sugar (0b11111011010 vs 2010/0x7da/03732), it doesn't > >> seem like too bad of an idea and it is also supported by a few other > >> languages. If there's any interest, I'll clean up the patch and > >> resubmit. > > > > I think it's a good idea. > > > > It won't spark interest in those that have already memorized the more > > compact hexadecimal representation of nibbles, but otherwise it's useful > > a simple non-BC breaking addition. > > Agreed. I have often thought this would be useful. > > Best regards, > --Matthew Especially given how common it is to use hex constants as bit flags, being able to define them in binary to begin with would help readability. (Yes, I just said "writing in binary" would "help readability." God help us all. ) +1 --Larry Garfield