Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49811 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53436 invoked from network); 30 Sep 2010 14:24:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2010 14:24:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; 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:54075] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/F1-43687-68D94AC4 for ; Thu, 30 Sep 2010 10:24:06 -0400 Received: from [192.168.178.31] (p5DCBCD5E.dip.t-dialin.net [93.203.205.94]) (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 315B8442CD; Thu, 30 Sep 2010 16:24:03 +0200 (CEST) To: Adam Harvey Cc: PHP internals In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Thu, 30 Sep 2010 16:24:01 +0200 Message-ID: <1285856641.16846.92.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 Thu, 2010-09-30 at 21:33 +0800, Adam Harvey wrote: > All, > > I've just written an RFC (with a patch against trunk) to implement a > Comparable interface similar to that in Java — in effect, allowing > object instances to be compared with semantics defined in userspace. > This is admittedly at the lower end of RFC-worthy proposals, but it's > a good system, and I'd like to see it used a little more. Plus, it's > good practice for the more interesting stuff to come. :) What is this "more interesting stuff to come"? - currently it is a bit syntactic sugar, one might argue a feature which makes reading code harder(*), and we are careful with adding such. (*) Right now it is quite clear what happens if you read $a == $b there are a few edge cases (0 == "100000 mails ina thread") but overall quite clear. With your patch "anything" might happen, which is hard to detect as we don't enforce strong typing, which would give a hint. johannes