Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70739 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99978 invoked from network); 19 Dec 2013 02:38:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2013 02:38:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.182 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.182 mail-ob0-f182.google.com Received: from [209.85.214.182] ([209.85.214.182:50666] helo=mail-ob0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/F2-14632-E1C52B25 for ; Wed, 18 Dec 2013 21:38:22 -0500 Received: by mail-ob0-f182.google.com with SMTP id wp4so558561obc.13 for ; Wed, 18 Dec 2013 18:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jXNff2tfQBDag+n0FG1L0qYj5b1Jl+uYH2aER64wfvY=; b=ULB+DWT/RvMtKOHDdCWeyaPWJvNfCBOHkj5dCeSzLZkOHKfhEJrgt3nnFBy0Pwz59A lyIEmTlvuDE+4sVFVZ2D08BYdjhn9IvdIjYtfjEuahXWkemaR4Ewkx6UkuZajHQP4HJR EYVQf+reAZHr+AQJb5dLe7K6dVziORxbbsMOWxShaJYfexrfCxeejR8yxj6fTpIDLB/j X+cViyJuMyh8YR9Jw3p9yu4f4LPxlPtDjxm80kOlmqhLG2rpDNQDcWMd1Lpdd8LELZ7B axSVzFyTvNOi1HPg0qwbddYyp/z7gcnpaI+4Juje4j7cvTOfs5acb3oMaXCD7e/je/qL 69Gw== MIME-Version: 1.0 X-Received: by 10.182.221.230 with SMTP id qh6mr23385404obc.7.1387420699386; Wed, 18 Dec 2013 18:38:19 -0800 (PST) Received: by 10.76.12.135 with HTTP; Wed, 18 Dec 2013 18:38:19 -0800 (PST) In-Reply-To: References: Date: Wed, 18 Dec 2013 19:38:19 -0700 Message-ID: To: Tjerk Meesters Cc: Kris Craig , PHP Internals Content-Type: multipart/alternative; boundary=001a11c2fcb8f0ead104edda0d55 Subject: Re: [PHP-DEV] Re: [vote] pow-operator From: morrison.levi@gmail.com (Levi Morrison) --001a11c2fcb8f0ead104edda0d55 Content-Type: text/plain; charset=ISO-8859-1 > > >> That said, if there are other reasons for voting 'no' besides > >> associativity, feel free to shoot me an email or discuss it on the list. > > > > What did it for me was the lower precedence for the unary minus. I don't > > want to have another language that thinks a negative number squared is a > > negative number. I understand and respect your reasoning as outlined in > > the RFC, but this is a deal-breaker for me. > > I've had a short discussion with Anthony about this and he convinced me > that I was indeed wrong about my "unary minus" reasoning; therefore I have > updated the RFC to reflect that. So: > > echo -3 ** 2; // 9 > echo 1 - 3 ** 2; // -8 > > The unary minus is now at the same level as `[`, the array dereferencing > operator. > We should follow the mathematic precedence rules; -3 ** 2 should be -9. Note that "-3^2" as input to Mathematica, Matlab and Google search engine all gave -9 as the answer, *as mathematically expected*. --001a11c2fcb8f0ead104edda0d55--