Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67409 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8742 invoked from network); 12 May 2013 20:35:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 May 2013 20:35:42 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.67 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.67 smtp67.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.67] ([108.166.43.67:38199] helo=smtp67.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/46-55400-C1DFF815 for ; Sun, 12 May 2013 16:35:41 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 96114148094; Sun, 12 May 2013 16:35:37 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp1.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 125E7148072; Sun, 12 May 2013 16:35:36 -0400 (EDT) Message-ID: <518FFD17.4040202@sugarcrm.com> Date: Sun, 12 May 2013 13:35:35 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Nikita Popov CC: Sara Golemon , Antony Dovgal , PHP internals References: <518FD653.6070705@daylessday.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Internal operator overloading and GMP improvements From: smalyshev@sugarcrm.com (Stas Malyshev) 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