Re: Re: rfc: pow-operator

From: Date: Sun, 24 Nov 2013 15:56:30 +0000
Subject: Re: Re: rfc: pow-operator
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-70355@lists.php.net to get a copy of this message
On Sun, Nov 24, 2013 at 4:26 PM, Chris London <me@chrislondon.co> wrote: > On Sun, Nov 24, 2013 at 7:15 AM, Tjerk Meesters <tjerk.meesters@gmail.com>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

« previous php.internals (#70355) next »