Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70355 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45968 invoked from network); 24 Nov 2013 15:56:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2013 15:56:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.177 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.177 mail-lb0-f177.google.com Received: from [209.85.217.177] ([209.85.217.177:39380] helo=mail-lb0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/E5-10115-1B122925 for ; Sun, 24 Nov 2013 10:56:34 -0500 Received: by mail-lb0-f177.google.com with SMTP id w7so2393855lbi.22 for ; Sun, 24 Nov 2013 07:56:30 -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=sIS3NxPvEkuTUDVzTO4EG2RDxLLNdrGWYNEk6CE1NJA=; b=Oh8KqxjVAPfMMmamu/NwhN8bA3zdhQENJMGSQDC57wY7Svz4gCh9HFz9IPlY/TypNv aHs1VNT2uimdyraus+gTvHO770R4wp8i1Y8Vuk3Ydor/WejQTjFwMXOJTt40rUj9zdO0 3PPymzaIAafQ2D9jLOWosQnfVu7jp8CrFa1qzUzbQ/WQ0tZ5myYD8huZGOsHw8RnWgiN rsuL+bcCy55o/UgjebXJQSYrTWqZjz40UbXKh+TsXo5XgQdwUHM9IHTmTEszUZsHxTK/ 0h++WBkMzCU2yxMq89SayHQX0pCrD5MVjeOQrCvIemZBROh4tBZxZDbkRusIytur2hbb nnnA== MIME-Version: 1.0 X-Received: by 10.112.168.170 with SMTP id zx10mr17778296lbb.0.1385308590564; Sun, 24 Nov 2013 07:56:30 -0800 (PST) Received: by 10.112.157.33 with HTTP; Sun, 24 Nov 2013 07:56:30 -0800 (PST) In-Reply-To: References: Date: Sun, 24 Nov 2013 16:56:30 +0100 Message-ID: To: Chris London Cc: Tjerk Meesters , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: rfc: pow-operator From: pierre.php@gmail.com (Pierre Joye) On Sun, Nov 24, 2013 at 4:26 PM, Chris London wrote: > On Sun, Nov 24, 2013 at 7:15 AM, Tjerk Meesters wrote: >> >> 2. The available votes for the associativity is reduced to either right or >> non associative; I'd rather see it done right (pun intended) or done in a >> way whereby the developer must put parentheses to disambiguate. >> > > I completely agree. Here's another resource that explains a little more why > the exponent comes before the negation: > http://mathforum.org/library/drmath/view/55709.html Replying here about the general idea of having power as an operator, I really like the optimization brought by this change. However I don't really like ** and all the confusions it brings (whether other languages support it or not, from a precedence point of view). Should it not be possible to do something similar than isset? Changing pow from a function to operator? The big advantage is that any existing code will benefit from it without code changes. Cheers, -- Pierre @pierrejoye | http://www.libgd.org