Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49809 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49634 invoked from network); 30 Sep 2010 14:08:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2010 14:08:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:51759] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/31-43687-FD994AC4 for ; Thu, 30 Sep 2010 10:08:32 -0400 Received: by fxm11 with SMTP id 11so1692971fxm.29 for ; Thu, 30 Sep 2010 07:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Mo67adSLzJcJhCuNj3d9TJM1ndlgUkCEzDnDYo+905c=; b=a5M6gVXEceWbhLAtD0/ZZxIMR/k0zZo0fdOtg+fMQ+Vpw/TUdlpeb0Nlhhi+oNimhM jTarwVp73Cjw+Aks6cwsfeKYM6YSbtreUo2gr2IGmX7+swt4HTb1Wmqtc41Bh1QZtKs4 RIuhtBxSI7rFYyj2vldGwfTGQEqG5ljxDA3Ak= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Y44TU9dfUDXNZlc3v5pctzPoPM5vE31c6zo8gohHpxWdUix8jhTeMPOpVMV/6xWe4P tsWB04i+f6tq0LOVvyiPq1a4HPE5woHLeec7nCmE11QnRvjMt05AAd4E/irh+yU0ZOOu 8ujzcjnfVazapuYL8aKHaE95vtsB04F8zb0NQ= MIME-Version: 1.0 Received: by 10.223.125.70 with SMTP id x6mr3742851far.85.1285855708588; Thu, 30 Sep 2010 07:08:28 -0700 (PDT) Sender: kalle.php@gmail.com Received: by 10.223.6.28 with HTTP; Thu, 30 Sep 2010 07:08:28 -0700 (PDT) In-Reply-To: References: Date: Thu, 30 Sep 2010 16:08:28 +0200 X-Google-Sender-Auth: YneP3NEBmdhyuX_MIQCa_VC6Np0 Message-ID: To: Adam Harvey Cc: PHP internals Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Comparable interface From: kalle@php.net (Kalle Sommer Nielsen) Hi Adam 2010/9/30 Adam Harvey : > All, > > I've just written an RFC (with a patch against trunk) to implement a > Comparable interface similar to that in Java =97 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. :) > > The RFC is at http://wiki.php.net/rfc/comparable, and the patch at > http://www.adamharvey.name/patches/comparable.diff.txt. Any and all > feedback welcome, particularly since I'm still learning my way around > the innards of the Zend Engine, and it's entirely possible (indeed, > likely) that I've overlooked something obvious. I think its a great addition, but I think the interface should be defined within ZE like the other base interfaces that interact directly with the language syntax (like Iterator) and not in SPL. The patch itself is flowlessly simple and I think it would be a great addition for trunk, +1 --=20 regards, Kalle Sommer Nielsen kalle@php.net