Re: Re: rfc: pow-operator
| From: | Tjerk Meesters | Date: | Mon, 25 Nov 2013 00:38:49 +0000 |
| Subject: | Re: Re: rfc: pow-operator | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70367@lists.php.net to get a copy of this message | ||
Hi Pierre,
On Sun, Nov 24, 2013 at 11:56 PM, Pierre Joye <pierre.php@gmail.com> wrote:
> 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.
>
Speeding up existing code sounds like a very good idea actually :) I'll
look into this.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://www.libgd.org
>
--
--
Tjerk