Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70336 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95210 invoked from network); 24 Nov 2013 00:52:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2013 00:52:00 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.196 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.196 imap4.ox.registrar-servers.com Received: from [192.64.116.196] ([192.64.116.196:40507] helo=imap4.ox.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/C0-25904-DAD41925 for ; Sat, 23 Nov 2013 19:51:58 -0500 Received: from localhost (localhost [127.0.0.1]) by oxmail.registrar-servers.com (Postfix) with ESMTP id 7629E560075; Sat, 23 Nov 2013 19:51:55 -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 b88mQdJcl_y9; Sat, 23 Nov 2013 19:51:55 -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 6A55F560071; Sat, 23 Nov 2013 19:51:54 -0500 (EST) Message-ID: <52914DA8.7050303@ajf.me> Date: Sun, 24 Nov 2013 00:51:52 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Kris Craig , Derick Rethans CC: Tjerk Meesters , PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] rfc: pow-operator From: ajf@ajf.me (Andrea Faulds) On 24/11/13 00:31, Kris Craig wrote: > We should be following standard Order of Operations here. As such, the > option of no associativity should be included. Furthermore, there needs to > be a voting option regarding how to deal with even exponents of negative > bases; i.e. treat "-3 ^ 2" as "-3 ^ 2 == 9" or as "-(3 ^ 2) == -9". > > Without those options, my vote would be a firm No. > I am worried that adding so many options might cause problems. Is it fair if it passes 3/4, but there is only a plurality for, say, left-associativity or right-associativity? What if someone votes for it, but would not have voted for it were it to be left-associative? I suggest that either Tjerk makes a decision for us and offers a straight Yes/No choice, or he limits the choices to very few and combines them, so: * Yes, right-associative * Yes, left-associative * No Oh, and for my personal thoughts on the matter: I know ** from Python, and I think (2 ** (3 ** 2)) is more useful than ((2 ** 3) ** 2), so I'd like (-2 ** 3 ** 2) to be -(2 ** (3 ** 2)), just as Python does it. -- Andrea Faulds http://ajf.me/