Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49807 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45001 invoked from network); 30 Sep 2010 13:33:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2010 13:33:32 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.161.170 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:63490] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/40-43687-9A194AC4 for ; Thu, 30 Sep 2010 09:33:30 -0400 Received: by gxk25 with SMTP id 25so876656gxk.29 for ; Thu, 30 Sep 2010 06:33:27 -0700 (PDT) Received: by 10.231.10.141 with SMTP id p13mr3711580ibp.183.1285853606162; Thu, 30 Sep 2010 06:33:26 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.231.79.3 with HTTP; Thu, 30 Sep 2010 06:33:05 -0700 (PDT) Date: Thu, 30 Sep 2010 21:33:05 +0800 X-Google-Sender-Auth: OJSfctuNFCBnC6qZ64DOyBaWx4I Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: RFC: Comparable interface From: aharvey@php.net (Adam Harvey) All, 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, 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. If there's no great resistance to the concept or implementation, I'm happy enough to flip this into the voting stage sooner rather than later so we can get it out of the way. Thanks, Adam