Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49816 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60955 invoked from network); 30 Sep 2010 14:47:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2010 14:47:36 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:42915] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/A3-43687-403A4AC4 for ; Thu, 30 Sep 2010 10:47:35 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 4223FDE13D; Thu, 30 Sep 2010 15:47:30 +0100 (BST) Date: Thu, 30 Sep 2010 15:47:30 +0100 (BST) X-X-Sender: derick@kossu.derickrethans.nl To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= cc: Adam Harvey , PHP internals In-Reply-To: <1285856641.16846.92.camel@guybrush> Message-ID: References: <1285856641.16846.92.camel@guybrush> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1101564123-1285858050=:2461" Subject: Re: [PHP-DEV] RFC: Comparable interface From: derick@php.net (Derick Rethans) --8323329-1101564123-1285858050=:2461 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 30 Sep 2010, Johannes Schl=C3=BCter wrote: > On Thu, 2010-09-30 at 21:33 +0800, Adam Harvey wrote: > > All, > >=20 > > I've just written an RFC (with a patch against trunk) to implement a > > Comparable interface similar to that in Java =E2=80=94 in effect, allow= ing > > 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. :) >=20 > 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. >=20 >=20 > (*) Right now it is quite clear what happens if you read > $a =3D=3D $b > there are a few edge cases (0 =3D=3D "100000 mails ina thread") but overa= ll > 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. It sounds a little bit like operator over loading to me... cheers, Derick --=20 http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug --8323329-1101564123-1285858050=:2461--