Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21736 invoked from network); 19 Dec 2013 22:13:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2013 22:13:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 198.187.29.247 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 198.187.29.247 imap4-3.ox.registrar-servers.com Received: from [198.187.29.247] ([198.187.29.247:37840] helo=imap4-3.ox.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/2D-42949-88F63B25 for ; Thu, 19 Dec 2013 17:13:30 -0500 Received: from localhost (localhost [127.0.0.1]) by oxmail.registrar-servers.com (Postfix) with ESMTP id 34148560075; Thu, 19 Dec 2013 17:13:11 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap4.ox.registrar-servers.com Received: from oxmail.registrar-servers.com ([127.0.0.1]) by localhost (imap4.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9y7eA2qMie9M; Thu, 19 Dec 2013 17:13:11 -0500 (EST) Received: from [192.168.0.13] (unknown [94.13.99.191]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 5F91B560082; Thu, 19 Dec 2013 17:12:58 -0500 (EST) Message-ID: <52B36F57.60009@ajf.me> Date: Thu, 19 Dec 2013 22:12:39 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Rasmus Lerdorf , Kris Craig , Daniel Lowrey CC: "internals@lists.php.net" References: <52B36BFC.4080708@lerdorf.com> In-Reply-To: <52B36BFC.4080708@lerdorf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: power operator (again) From: ajf@ajf.me (Andrea Faulds) On 19/12/13 21:58, Rasmus Lerdorf wrote: > > No, the average PHP developer is going to do $var ** 2 and it will > behave exactly as they expect with negative values. Yes, in the very > rare case that someone for some reason hardcodes a negative literal > there, they are going to have to learn about operator precedence because > we really can't have 0 - 3**2 be different from - 3**2. > We also, surely, cannot have -3**2 act differently from - 3 ** 2, for the same reason. -- Andrea Faulds http://ajf.me/