Re: [RFC] Integer Semantics
| From: | Dmitry Stogov | Date: | Wed, 20 Aug 2014 05:52:03 +0000 |
| Subject: | Re: [RFC] Integer Semantics | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76716@lists.php.net to get a copy of this message | ||
1) INF conversion to zero seems wrong. May be +INF should be converted to
MAX_LONG and -INF to MIN_LONG?
2) Negative shifts would be useful, as Sara mentioned.
3) a bit unrelated, but it also may make sense to introduce a logical right
shift operator (>>> in Java)
the rest seems fine, patch looks OK.
Thanks. Dmitry.
On Wed, Aug 20, 2014 at 8:05 AM, Sara Golemon <pollita@php.net> wrote:
> On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds <ajf@ajf.me> wrote:
> > https://wiki.php.net/rfc/integer_semantics
> >
> In a perfect world, I'd rather see "<< -X" be equivalent to ">>
> X",
> but since we do something very different currently, I think your
> approach of throw an error and ask questions later seems appropriate.
> The other ones all sound inarguable.
>
> +1
>
> -Sara
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>