Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49835 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91074 invoked from network); 1 Oct 2010 08:38:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2010 08:38:44 -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.214.170 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:58178] helo=mail-iw0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/4A-18648-21E95AC4 for ; Fri, 01 Oct 2010 04:38:43 -0400 Received: by iwn37 with SMTP id 37so4166542iwn.29 for ; Fri, 01 Oct 2010 01:38:40 -0700 (PDT) Received: by 10.231.170.79 with SMTP id c15mr5281465ibz.82.1285922320032; Fri, 01 Oct 2010 01:38:40 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.231.79.3 with HTTP; Fri, 1 Oct 2010 01:38:19 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Oct 2010 16:38:19 +0800 X-Google-Sender-Auth: 0p3dirHIFQyTl8AI2s_yP5-MqiM Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: RFC: Comparable interface From: aharvey@php.net (Adam Harvey) On 30 September 2010 21:33, Adam Harvey wrote: > 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, allowin= g > 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. :) I've updated the RFC with a fresh patch that doesn't involve SPL at all and attempted to incorporate some of the questions and answers so far into the RFC. I've also added a section for concerns with the RFC; I've attempted to distil the concerns I've seen so far, but please feel free to edit that list if specific concerns are misrepresented or unrepresented. Links: RFC: http://wiki.php.net/rfc/comparable Patch v2: http://www.adamharvey.name/patches/comparable-v2.diff.txt Thanks, Adam