Re: rfc: pow-operator
| From: | Sanford Whiteman | Date: | Sun, 24 Nov 2013 06:27:33 +0000 |
| Subject: | Re: rfc: pow-operator | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70345@lists.php.net to get a copy of this message | ||
> Also, by making ** right-associative, 2**3**2 is visually more
> distinct from 2 ** (3*2); if left-associative, 2 ** (3 ** 2) and 2
> ** (3*2) would be more easily confused when reading or writing.
Hmm... to me, this argument is pretty circuitous, as it assumes people
actively remember ( x ** y ) ** z == x ** ( y * z ) and yet are not
using the optimization nor parentheses. It's hard for me to follow
your logic here. Plus, you shouldn't say something will be less
performant unless you know the compiler won't optimize it on its own!
If you're concerned (not unreasonably) about confusing ** and *, why
not suggest another character instead?
-- S.