Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49850 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89877 invoked from network); 3 Oct 2010 14:37:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2010 14:37:52 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 ns.km36107.keymachine.de Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:56584] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/50-22289-E3598AC4 for ; Sun, 03 Oct 2010 10:37:51 -0400 Received: from [192.168.1.31] (ppp-93-104-61-73.dynamic.mnet-online.de [93.104.61.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id CEDF54453F; Sun, 3 Oct 2010 16:37:46 +0200 (CEST) To: Gustavo Lopes Cc: internals@lists.php.net In-Reply-To: References: <1285856641.16846.92.camel@guybrush> <1286115365.2606.302.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Date: Sun, 03 Oct 2010 16:37:41 +0200 Message-ID: <1286116661.2606.313.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] RFC: Comparable interface From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Sun, 2010-10-03 at 15:21 +0100, Gustavo Lopes wrote: > On Sun, 03 Oct 2010 15:16:05 +0100, Johannes Schlüter > wrote: > > > On Thu, 2010-09-30 at 22:57 +0800, Adam Harvey wrote: > >> > On Thu, 30 Sep 2010, Johannes Schlüter wrote: > >> >> What is this "more interesting stuff to come"? > >> > >> Nothing that's likely to be ready before the forthcoming release > >> cycle. I really did just want the RFC writing practice, since I > >> haven't done one within PHP's structure before. :) > > > > I actually see no reason why we shouldn't expose the compare overload we > already have for internal classes to userspace classes. For internal classes it is needed, as they extend zend_object with custom information we don't find in hash tables etc. so without the internal handler we can't decide whether two objects are equal or not. > However, the patch goes much further than this and, even if that direction > were desired, it takes, in my opinion, the wrong options in the details > I've mentioned. For userspace-defined classes the equal and other comparison operation are clearly defined. (Well, maybe some of the conversions aren't always that clear, but still follow rules) When adding this feature the comparison operators change their meaning ... johannes