Re: [RFC] Internal operator overloading and GMP improvements

From: Date: Sun, 12 May 2013 20:35:35 +0000
Subject: Re: [RFC] Internal operator overloading and GMP improvements
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi!

> Why would this be confusing? I'd agree if this happened in userland (people
> could wonder why the operators are swapped), but internally we are already
> dealing with this anyway. E.g. when you implement compare_objects you have
> to be aware of this (to understand stuff like the return 1 trick).

Your code suggests (even though RFC never says it) that the left operand
defines the comparison. However, for the switched operations, the right
operand would then define the comparison. It is pretty confusing, IMO.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227


Thread (30 messages)

« previous php.internals (#67409) next »