Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70339 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99891 invoked from network); 24 Nov 2013 01:15:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2013 01:15:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.54 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.128.54 mail-qe0-f54.google.com Received: from [209.85.128.54] ([209.85.128.54:33396] helo=mail-qe0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/D1-25904-03351925 for ; Sat, 23 Nov 2013 20:15:29 -0500 Received: by mail-qe0-f54.google.com with SMTP id cy11so696810qeb.13 for ; Sat, 23 Nov 2013 17:15:26 -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=vrIqvZqNeOfAfPM4zSpNGFDv8XfUg2sKP6iCOWGRsEo=; b=q0btzlj67j+iof2a4j0K+DCCbr2mCRWXocTwm/K3CcMfBJFw8YZeSxxBKWQKmMPOR0 Doou1hJkLR2bVO+4H+xWhzJCvX6eWJvaeKQkJv+U86KTG2GTJKBjPEIvX3AYuUjNYRnQ sJwiy8rzDXLZZkvyOze2rFPC/g+NnSrqpfdMgEPQDvWGt09xWNK/GKg/jJpTKVDjBJdO An8/gQFH9HI1v12fQ3x/3oRUF3Bsmlb0hI5412jBWeTSaLMj6l1t/OsnKHQX/1AUTOZa ZPWsJ8erdG5N4ssvZGhYHqsL+5Bau0fSy8heupOrbWdMBD6ewKBTEbSSFwSzVIpbVIBp cm8Q== MIME-Version: 1.0 X-Received: by 10.49.28.226 with SMTP id e2mr146995qeh.80.1385255726459; Sat, 23 Nov 2013 17:15:26 -0800 (PST) Received: by 10.140.37.179 with HTTP; Sat, 23 Nov 2013 17:15:26 -0800 (PST) In-Reply-To: References: <52914DA8.7050303@ajf.me> Date: Sun, 24 Nov 2013 02:15:26 +0100 Message-ID: To: Kris Craig Cc: Andrea Faulds , Derick Rethans , Tjerk Meesters , PHP Internals Content-Type: multipart/alternative; boundary=047d7bdc0ae27fb13c04ebe1fbe5 Subject: Re: [PHP-DEV] rfc: pow-operator From: tyra3l@gmail.com (Ferenc Kovacs) --047d7bdc0ae27fb13c04ebe1fbe5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Nov 24, 2013 at 1:58 AM, Kris Craig wrote: > I don't see any benefit in using Python's unique behavior as a model. they aren't the only ones doing it that way, there were a bunch of languages mentioned for left, right and no associativity, maybe it would be useful to list them on the rfc page. > The > model should conform to established mathematical laws, not some other > arbitrarily chosen scripting language. the power tower comes from mathematical laws, and that would support the right association, as mentioned by Jakub in the other thread. > According to Order of Operations, > all operations of the same type within the same context (parentheses) mus= t > be processed in order from left to right. For example, -2 ** 3 ** 2 woul= d > be processed from left to right, like this: pow( pow( -2, 3 ), 2 ); > see above, and this was also discussed in the other thread. > > We've introduced multiple options into RFCs before without encountering t= he > problems you mention. The alternative would be to create a separate RFC > that calls for behavior that conforms to established arithmetic standards= . > But it makes more sense to me to put that into one RFC rather than havin= g > two separate threads to discuss what should be one single issue. > > --Kris > > I think it would make sense to extend the rfc with the issues brought up, and answer them there, because it seems that we started repeating the same arguments pro and con. ps: please don't top post. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7bdc0ae27fb13c04ebe1fbe5--