Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83259 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74134 invoked from network); 20 Feb 2015 03:46:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 03:46:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.54 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.54 mail-qa0-f54.google.com Received: from [209.85.216.54] ([209.85.216.54:46263] helo=mail-qa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/41-65128-BFDA6E45 for ; Thu, 19 Feb 2015 22:46:05 -0500 Received: by mail-qa0-f54.google.com with SMTP id x12so10345133qac.13 for ; Thu, 19 Feb 2015 19:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=E+fpOcSnJ7va5A2LH0kI/+1qLNGHqkL2bvbcSJ9/NMc=; b=GAy4ne48nK9sDVuYAodVx1TGWNzFPh8Ownc4E0jZ9uwG0WE0HDIkPwW6t234OP2D89 1pJrFFUCiz5jPM+McD2Q3J5kVmPsDByDtjjhiJKiQy8vRpLtefWZJbLVTn9yqxB29jc4 OfkWjZZmNAgmWxifIgS3PTNfWC2oSpQpRLFTM6OPYXC0QM6cXslBTqCLvnEf4AbiQII6 3lB5paP91nAsbaxhXXQf2Wo4WEC+Sv4sThUqBD3qGV49elvR2He/49oxZ5o2YwAADsW4 O5S/X1XtB67Pq8NVjxoS8W/W7gFS1iJE75IdRZwkqo25dRUOIDxVSrHqQxovCBryARo4 8TyQ== MIME-Version: 1.0 X-Received: by 10.140.102.165 with SMTP id w34mr19507433qge.26.1424403960102; Thu, 19 Feb 2015 19:46:00 -0800 (PST) Received: by 10.96.39.195 with HTTP; Thu, 19 Feb 2015 19:45:59 -0800 (PST) In-Reply-To: References: Date: Thu, 19 Feb 2015 19:45:59 -0800 Message-ID: To: Adam Harvey Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Comparable: the revenge From: pierre.php@gmail.com (Pierre Joye) On Thu, Feb 19, 2015 at 1:40 PM, Adam Harvey wrote: > Hi all, > > Those of you with long memories will remember that I proposed a > Comparable interface way back in the pre-5.4 days, but withdrew it > when it became obvious that there was no consensus for it as a feature > and that a vote was likely to fail. > > RFC: https://wiki.php.net/rfc/comparable > PR: https://github.com/php/php-src/pull/1097 > > Why reanimate it now, I hear you ask? I think that comparisons have > only become more prominent in the language: we now have a spaceship > operator for explicit comparisons, yet the behaviour of object > comparisons can be obscure, to say the least, and the user has no > control over how their objects are compared. > > At this stage, I intend to put this up for a vote on March 5 (vote > ending March 12), with the obvious endgame being that this would be > included in 7.0. > > Thanks, > Thanks you :) I like it. It is simple and straightforward. I agree with other that it is easily done using a simple function (Adam's) but I do not like it much, less clear. Cheers, -- Pierre @pierrejoye | http://www.libgd.org