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

2014-08-28 Thread Andrea Faulds
On 22 Aug 2014, at 12:36, Derick Rethans wrote: > Although I think it is good to make it work the same on every platform, > I do think that changing it to *match* what the most used compiler (GCC) > on our most used platform (Linux/AMD64) is what the new behaviour should > be like — not somet

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

2014-08-22 Thread Derick Rethans
On Wed, 20 Aug 2014, Andrea Faulds wrote: > > On 20 Aug 2014, at 03:53, Laruence wrote: > > > On Wed, Aug 20, 2014 at 6:36 AM, Andrea Faulds wrote: > >> Good evening, > >> > >> I have made an RFC which would make some small changes to how > >> integers are handled, targeted at PHP 7: > >> >

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-22 Thread Lester Caine
On 21/08/14 19:17, Stas Malyshev wrote: > We have millions of people using PHP 5, and the goal is for > almost all of them to eventually use PHP 7, otherwise there's no point > in it. Each BC break creates another hurdle on the way to it. We should > take it seriously. Currently we have millions s

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Laruence
Hey: On Thu, Aug 21, 2014 at 11:30 PM, Derick Rethans wrote: > On Tue, 19 Aug 2014, Kris Craig wrote: > >> On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds wrote: >> >> > I have made an RFC which would make some small changes to how integers >> > are handled, targeted at PHP 7: >> > >> > htt

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Derick Rethans
On Thu, 21 Aug 2014, Marc Bennewitz wrote: > On 21.08.2014 17:30, Derick Rethans wrote: > > On Tue, 19 Aug 2014, Kris Craig wrote: > > > > > On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds wrote: > > > > > > > I have made an RFC which would make some small changes to how integers > > > > are ha

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Kris Craig
On Thu, Aug 21, 2014 at 8:30 AM, Derick Rethans wrote: > On Tue, 19 Aug 2014, Kris Craig wrote: > > > On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds wrote: > > > > > I have made an RFC which would make some small changes to how integers > > > are handled, targeted at PHP 7: > > > > > > https://

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Marc Bennewitz
On 21.08.2014 17:30, Derick Rethans wrote: On Tue, 19 Aug 2014, Kris Craig wrote: On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds wrote: I have made an RFC which would make some small changes to how integers are handled, targeted at PHP 7: https://wiki.php.net/rfc/integer_semantics Thoug

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Trevor Suarez
What if we were to *quantify* backwards compatibility in a way, as opposed to just discussing the hypothetical BC breaking potential of a change? I've never thought of this before, but this discussion had me thinking... When I write a library that has a large user base, I try to write as many unit

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Stas Malyshev
Hi! >> And since you're targetting the next major release, BC isn't an issue. > > This sort of blanket statements that "Backwards Compatibility is not an > issue" with a new major version is extremely unwarranted. *Extreme care* > should be taken when deciding to break Backwards Compatibility. It

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread christopher jones
On 8/21/14, 11:09 AM, Levi Morrison wrote: Every time we break BC — in either of the ways Derick said — we narrow the subset of PHP 5 and PHP 7 that's available to people writing PHP code that has to work on both. If we narrow it too far, it'll be too unexpressive, or too hard to use, or just p

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Levi Morrison
> Every time we break BC — in either of the ways Derick said — we narrow > the subset of PHP 5 and PHP 7 that's available to people writing PHP > code that has to work on both. If we narrow it too far, it'll be too > unexpressive, or too hard to use, or just plain won't do something > that they'll

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Andrea Faulds
On 21 Aug 2014, at 18:28, Adam Harvey wrote: > Every time we break BC — in either of the ways Derick said — we narrow > the subset of PHP 5 and PHP 7 that's available to people writing PHP > code that has to work on both. If we narrow it too far, it'll be too > unexpressive, or too hard to use,

Re: [PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Adam Harvey
On 21 August 2014 08:30, Derick Rethans wrote: > Can I please urge people to not take Backwards Compatibility issues so > lightly. Please think really careful when you suggest to break Backwards > Compatibility, it should only be considered if there is a real and > important reason to do so. Chang

[PHP-DEV] On BC and not being evil (Was: Re: [PHP-DEV] [RFC] Integer Semantics)

2014-08-21 Thread Derick Rethans
On Tue, 19 Aug 2014, Kris Craig wrote: > On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds wrote: > > > I have made an RFC which would make some small changes to how integers > > are handled, targeted at PHP 7: > > > > https://wiki.php.net/rfc/integer_semantics > > > > Thoughts and questions are

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

2014-08-21 Thread Derick Rethans
On Tue, 19 Aug 2014, Andrea Faulds wrote: > Good evening, > > I have made an RFC which would make some small changes to how integers are > handled, targeted at PHP 7: > > https://wiki.php.net/rfc/integer_semantics I think it is good to make sure it behaves the same on all systems. However, I

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

2014-08-20 Thread Dmitry Stogov
On Wed, Aug 20, 2014 at 1:20 PM, Andrea Faulds wrote: > > On 20 Aug 2014, at 06:52, Dmitry Stogov wrote: > > > 1) INF conversion to zero seems wrong. May be +INF should be converted > to MAX_LONG and -INF to MIN_LONG? > > I think of Infinity as more of an error value than an actual number. Not >

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

2014-08-20 Thread Pierre Joye
On Wed, Aug 20, 2014 at 11:24 AM, Andrea Faulds wrote: > > On 20 Aug 2014, at 03:53, Laruence wrote: > >> On Wed, Aug 20, 2014 at 6:36 AM, Andrea Faulds wrote: >>> Good evening, >>> >>> I have made an RFC which would make some small changes to how integers are >>> handled, targeted at PHP 7: >>

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

2014-08-20 Thread Andrea Faulds
On 20 Aug 2014, at 03:53, Laruence wrote: > On Wed, Aug 20, 2014 at 6:36 AM, Andrea Faulds wrote: >> Good evening, >> >> I have made an RFC which would make some small changes to how integers are >> handled, targeted at PHP 7: >> >> https://wiki.php.net/rfc/integer_semantics > > I'd like do

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

2014-08-20 Thread Andrea Faulds
On 20 Aug 2014, at 06:52, Dmitry Stogov wrote: > 1) INF conversion to zero seems wrong. May be +INF should be converted to > MAX_LONG and -INF to MIN_LONG? I think of Infinity as more of an error value than an actual number. Not using MAX_LONG and MIN_LONG means it casts to the same value mat

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

2014-08-19 Thread Dmitry Stogov
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 look

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

2014-08-19 Thread Sara Golemon
On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds 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 appropr

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

2014-08-19 Thread Laruence
Hey: On Wed, Aug 20, 2014 at 6:36 AM, Andrea Faulds wrote: > Good evening, > > I have made an RFC which would make some small changes to how integers are > handled, targeted at PHP 7: > > https://wiki.php.net/rfc/integer_semantics I'd like don't change the works behavior. make it act the simil

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

2014-08-19 Thread Kris Craig
On Tue, Aug 19, 2014 at 3:36 PM, Andrea Faulds wrote: > Good evening, > > I have made an RFC which would make some small changes to how integers are > handled, targeted at PHP 7: > > https://wiki.php.net/rfc/integer_semantics > > Thoughts and questions are appreciated. Thanks! > -- > Andrea Fauld

[PHP-DEV] [RFC] Integer Semantics

2014-08-19 Thread Andrea Faulds
Good evening, I have made an RFC which would make some small changes to how integers are handled, targeted at PHP 7: https://wiki.php.net/rfc/integer_semantics Thoughts and questions are appreciated. Thanks! -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing