Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67337 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69420 invoked from network); 7 May 2013 16:28:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2013 16:28:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.179 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.179 mail-ob0-f179.google.com Received: from [209.85.214.179] ([209.85.214.179:55019] helo=mail-ob0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/23-54258-ACB29815 for ; Tue, 07 May 2013 12:28:59 -0400 Received: by mail-ob0-f179.google.com with SMTP id xn12so727985obc.38 for ; Tue, 07 May 2013 09:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=e69Kjgb9o6V6JSl3b9rTdd7sXHRLmrimPwoVfq8DW0o=; b=arELX/BaYKHt6hEPfWKCa6zS/HAzVgVvFTgE1BcpwxYw3EZQlVM16FZ3jkKCJaCnsU Orty87qQfy+R7YErSq+gyFWbHINfDQqa5kMgiJnKS1X5XTgDFDBuFgOifN8f25hcT9Qo ygHF0iwzMIc8ygxw3bjxjs9ft/LMRKIWhGqPl51r3BUFpHhvKzY13wmXe+6oS1gQgoMf gZyKS2x6mauyYDPVMcxUA7IG1HLEF/rs3CoiLTMkzd+E0I1qhj/l4xry4dgq4tdUesJB 9REGEGeQ7PvsvQTJMGtoyGTz1heOU3qg46PDyjPMUJXSBrNTBHqqXljlTyKOGguF56Ex U22Q== MIME-Version: 1.0 X-Received: by 10.182.24.5 with SMTP id q5mr756169obf.97.1367944136512; Tue, 07 May 2013 09:28:56 -0700 (PDT) Received: by 10.76.156.193 with HTTP; Tue, 7 May 2013 09:28:56 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 May 2013 10:28:56 -0600 Message-ID: To: Thomas Anderson Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c2af90545f0504dc235053 Subject: Re: [PHP-DEV] idea: implement a Comparable interface From: morrison.levi@gmail.com (Levi Morrison) --001a11c2af90545f0504dc235053 Content-Type: text/plain; charset=ISO-8859-1 > It'd be nice if, when doing $objA > $objB, that that'd invoke >> $objA->__compareTo($objB) or something, much like Java's Comparable >> interface. >> > > There is nothing stopping you from creating this in user-land. Also, I > have spent a lot of time writing libraries in PHP and I now believe that > this approach is not the best solution anyway. > Except for the magic that happens on the comparison, I mean. I really don't think PHP should go down that road at this point, if ever. --001a11c2af90545f0504dc235053--