Re: [PHP-DEV] [VOTE][RFC] Integer Semantics

[email protected] (Dmitry Stogov)
Newsgroups php.internals
Message-ID <CA+9eiLsdRRn0RxHrx=QYbJpEmp5H80hs+oB8+1MhJ0i24kDK=g@mail.gmail.com>
Hi Andrea,

Shifts by negative number may make sense. (N << -1) => (N >> 1)
At least receiving "false" from shift is not very pleasant.

In the patch you use SIZEOF_LONG. It probably should be changed to
SIZEOF_ZEND_LONG.

Thanks. Dmitry.


On Mon, Sep 15, 2014 at 8:31 PM, Andrea Faulds <[email protected]> wrote:

>
> On 15 Sep 2014, at 17:24, Levi Morrison <[email protected]> wrote:
>
> >> This RFC has been put to a vote. It starts today (2014-09-14) and ends
> in a week’s time (2014-09-21).
> >>
> >> https://wiki.php.net/rfc/integer_semantics#vote
> >
> > A few people have asked why I voted no; the only reason is that
> > division by zero will return `false` and emit a warning. Integers can
> > be converted to floating point numbers and dividing by zero in IEEE
> > 754 is defined as INF. I would rather leave behavior undefined by
> > voting no on this RFC than by defining it to a value which does not
> > make sense to me. The value false will get converted to zero in any
> > additional math, which is not the same as INF.
>
> The RFC does not touch division by zero. That was a suggestion for a
> future RFC.
>
> I’ve now removed that section to avoid confusion.
> --
> Andrea Faulds
> http://ajf.me/
>
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.