Re: [PHP-DEV] [RFC] Differentiate op from assign-op in operator overloading

2016-01-07 Thread Nikita Popov
On Tue, Jan 5, 2016 at 7:17 PM, Sara Golemon wrote: > On Mon, Jan 4, 2016 at 1:39 AM, Nikita Popov wrote: > > I'd like to provide some context as to why the current implementation > works > > as it does. > > > Thanks for the context, Niki. It makes sense

Re: [PHP-DEV] [RFC] Differentiate op from assign-op in operator overloading

2016-01-07 Thread Bob Weinand
> Am 07.01.2016 um 20:29 schrieb Sara Golemon : > On Thu, Jan 7, 2016 at 6:04 AM, Bob Weinand wrote: >> I think this RFC is attempting to solve the wrong problem... Let me explain >> why: >> >> a) What do you do in cases like: >> $a = gmp_init(125); >> $b =

Re: [PHP-DEV] [RFC] Differentiate op from assign-op in operator overloading

2016-01-07 Thread Nikita Popov
On Thu, Jan 7, 2016 at 8:18 PM, Sara Golemon wrote: > On Thu, Jan 7, 2016 at 5:16 AM, Nikita Popov wrote: > > GMP objects are, with the exceptions of gmp_setbit and gmp_clrbit, > immutable > > value objects. And yes, that's exactly what I would expect any

Re: [PHP-DEV] [RFC] Differentiate op from assign-op in operator overloading

2016-01-05 Thread Sara Golemon
On Mon, Jan 4, 2016 at 1:39 AM, Nikita Popov wrote: > I'd like to provide some context as to why the current implementation works > as it does. > Thanks for the context, Niki. It makes sense that, with GMP as the flagship target of operator overloading, stripping away the

Re: [PHP-DEV] [RFC] Differentiate op from assign-op in operator overloading

2016-01-04 Thread Nikita Popov
On Mon, Jan 4, 2016 at 1:37 AM, Sara Golemon wrote: > This is a separate proposal from the userspace operator overloading I > put up for Patricio yesterday and aims to fix what I see as a bug in > our operator overloading implementation (though some may disagree). > > It

[PHP-DEV] [RFC] Differentiate op from assign-op in operator overloading

2016-01-03 Thread Sara Golemon
This is a separate proposal from the userspace operator overloading I put up for Patricio yesterday and aims to fix what I see as a bug in our operator overloading implementation (though some may disagree). It specifically only seeks to differentiate const operations which produce a new value