Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-06 Thread Andrea Faulds
On 30 Jul 2014, at 03:31, Andrea Faulds wrote: > The intdiv RFC is put to the vote, with separate votes for the integer > division operator (%%) and intdiv function, the latter as a fallback. I would > highly encourage you to read the discussion in the “[RFC] intdiv()” thread > and the whole

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-05 Thread Pascal MARTIN
On 30/07/2014 04:31, Andrea Faulds wrote: Good evening, The intdiv RFC is put to the vote, with separate votes for the integer division operator (%%) and intdiv function, the latter as a fallback. I would highly encourage you to read the discussion in the “[RFC] intdiv()” thread and the whole

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Lester Caine
On 03/08/14 15:31, Andrea Faulds wrote: >> Your missing the point I was trying to make. That "(int)(3 / 2)" >> > essentially goes wrong only on 64bit systems is the bug that needs >> > fixing. > (int)(3 / 2) works fine, (int)(PHP_INT_MAX / 3) does not. > > It’s not a bug, it’s entirely intentional

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Andrea Faulds
On 3 Aug 2014, at 15:27, Lester Caine wrote: > Your missing the point I was trying to make. That "(int)(3 / 2)" > essentially goes wrong only on 64bit systems is the bug that needs > fixing. (int)(3 / 2) works fine, (int)(PHP_INT_MAX / 3) does not. It’s not a bug, it’s entirely intentional and

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Lester Caine
On 03/08/14 13:49, Andrea Faulds wrote: >> That the principle of sorting out 64 bit division is accepted is fairly >> > obvious from the current stated of the vote? Personally I still view >> > this as part of the general debate on just how 64bit integers are >> > supported by default in new builds

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Andrea Faulds
On 3 Aug 2014, at 13:51, Zeev Suraski wrote: > Based on the discussion on internals@ I'm not sure why it should not be > construed as consensus against any kind of operator for intdiv. Quite the > contrary, those who opposed it (myself included) opposed it on the grounds > that it's not nearly

RE: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Zeev Suraski
> -Original Message- > From: Andrea Faulds [mailto:a...@ajf.me] > Sent: Sunday, August 03, 2014 2:52 PM > To: Kris Craig > Cc: Chris Wright; Adam Harvey; PHP internals > Subject: Re: [PHP-DEV] [VOTE][RFC] intdiv() > > > On 3 Aug 2014, at 05:39, Kris Craig wro

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Andrea Faulds
On 3 Aug 2014, at 13:24, Lester Caine wrote: > That the principle of sorting out 64 bit division is accepted is fairly > obvious from the current stated of the vote? Personally I still view > this as part of the general debate on just how 64bit integers are > supported by default in new builds o

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Lester Caine
On 03/08/14 12:52, Andrea Faulds wrote: >> Agreed. I'd very much like to see another RFC that proposes more options >> for creating an operator for this. The vote against %% on this RFC should >> not be construed-- in my opinion, at least-- as a consensus against having >> any kind of operator

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-03 Thread Andrea Faulds
On 3 Aug 2014, at 05:39, Kris Craig wrote: > Agreed. I'd very much like to see another RFC that proposes more options for > creating an operator for this. The vote against %% on this RFC should not be > construed-- in my opinion, at least-- as a consensus against having any kind > of operat

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-08-02 Thread Kris Craig
On Thu, Jul 31, 2014 at 1:53 AM, Chris Wright wrote: > On 30 July 2014 18:51, Adam Harvey wrote: > > -1 explanation: I don't think %% is clear enough, the only sensible > > syntax choice (//) is unavailable to us, and I think the utility of > > having it baked into the language as an operator is

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-31 Thread Chris Wright
On 30 July 2014 18:51, Adam Harvey wrote: > -1 explanation: I don't think %% is clear enough, the only sensible > syntax choice (//) is unavailable to us, and I think the utility of > having it baked into the language as an operator is pretty minimal > regardless (I coded a lot of Python for scien

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-30 Thread Robert Williams
They don’t necessarily need to be symbols. Pascal, for example, uses ‘/' for floating-point division, ‘div' for integer division, ‘mod' for modulus, and ‘rem' for remainder. For example: 20 / 8 = 2.5 20 mod 8 = 4 In PHP, we already have precedence for non-symbol in operators like ‘and', ‘or',

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-30 Thread Kris Craig
On Wed, Jul 30, 2014 at 11:01 AM, Peter Lind wrote: > On 30 July 2014 19:57, Sara Golemon wrote: > > > On Wed, Jul 30, 2014 at 10:54 AM, Andrea Faulds wrote: > > > On 30 Jul 2014, at 18:51, Adam Harvey wrote: > > >> -1 explanation: I don't think %% is clear enough > > > > > > % returns the 2nd

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-30 Thread Peter Lind
On 30 July 2014 19:57, Sara Golemon wrote: > On Wed, Jul 30, 2014 at 10:54 AM, Andrea Faulds wrote: > > On 30 Jul 2014, at 18:51, Adam Harvey wrote: > >> -1 explanation: I don't think %% is clear enough > > > > % returns the 2nd part of the integer division, %% returns the 1st. > Surely that ma

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-30 Thread Andrea Faulds
On 30 Jul 2014, at 18:57, Sara Golemon wrote: > On Wed, Jul 30, 2014 at 10:54 AM, Andrea Faulds wrote: >> On 30 Jul 2014, at 18:51, Adam Harvey wrote: >>> -1 explanation: I don't think %% is clear enough >> >> % returns the 2nd part of the integer division, %% returns the 1st. Surely >> that

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-30 Thread Sara Golemon
On Wed, Jul 30, 2014 at 10:54 AM, Andrea Faulds wrote: > On 30 Jul 2014, at 18:51, Adam Harvey wrote: >> -1 explanation: I don't think %% is clear enough > > % returns the 2nd part of the integer division, %% returns the 1st. Surely > that makes sense? > That makes sense in PHP. Probably only i

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-30 Thread Andrea Faulds
On 30 Jul 2014, at 18:51, Adam Harvey wrote: > -1 explanation: I don't think %% is clear enough % returns the 2nd part of the integer division, %% returns the 1st. Surely that makes sense? > I think the utility of > having it baked into the language as an operator is pretty minimal > regardle

Re: [PHP-DEV] [VOTE][RFC] intdiv()

2014-07-30 Thread Adam Harvey
-1 explanation: I don't think %% is clear enough, the only sensible syntax choice (//) is unavailable to us, and I think the utility of having it baked into the language as an operator is pretty minimal regardless (I coded a lot of Python for scientific research in a previous job, and I don't think

[PHP-DEV] [VOTE][RFC] intdiv()

2014-07-29 Thread Andrea Faulds
Good evening, The intdiv RFC is put to the vote, with separate votes for the integer division operator (%%) and intdiv function, the latter as a fallback. I would highly encourage you to read the discussion in the “[RFC] intdiv()” thread and the whole RFC before voting. The vote is here: https