On Thu, Jul 17, 2014 at 6:31 AM, Andrea Faulds <a...@ajf.me> wrote:

>
> On 17 Jul 2014, at 10:24, Nikita Popov <nikita....@gmail.com> wrote:
>
> > This is already what is currently happening, see
> > http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_operators.c#1067.
> >
> > Andreas proposal is only useful in the case that the numbers don't divide
> > exactly and you need round-down/truncation behavior and your numbers are
> in
> > a range where the indirection through double arithmetic results in
> > precision loss.
>
> It’s still useful regardless as it saves you implementing it in terms of
> floats.
>
> I mean, you can implement a right shift (rarely used outside bit masks) in
> terms of multiplication and exponentiation, but that doesn’t mean you
> shouldn’t have a right shift.
>
> --
> Andrea Faulds
> http://ajf.me/
>
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
There seems to be a pretty even split on this.  Personally, I'm a +1 for
it.  PHP has tons of obscure, rarely used functions.  Even if the gain is
relatively minor, there's really no cost that I can think of.  So from a
cost-benefit standpoint, even a minor improvement is still desirable when
there's no practical downside to it.

Given the number of options that are coming up, I'd suggest you break the
RFC down into two votes:  A simple yes/no vote followed by an "if yes, how
should it be implemented?" vote with the various options (the operators,
functions, etc).  If the RFC passes, then whichever option got a plurality
of the votes would be the implemented option.

So yeah, I'd say bring it to a vote and that'll settle it one way or
another.

--Kris

Reply via email to