Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49818 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64088 invoked from network); 30 Sep 2010 14:58:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Sep 2010 14:58:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:53073] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/54-43687-D75A4AC4 for ; Thu, 30 Sep 2010 10:58:06 -0400 Received: by yxt33 with SMTP id 33so940313yxt.29 for ; Thu, 30 Sep 2010 07:58:03 -0700 (PDT) Received: by 10.231.155.7 with SMTP id q7mr3874207ibw.105.1285858682541; Thu, 30 Sep 2010 07:58:02 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.231.79.3 with HTTP; Thu, 30 Sep 2010 07:57:41 -0700 (PDT) In-Reply-To: References: <1285856641.16846.92.camel@guybrush> Date: Thu, 30 Sep 2010 22:57:41 +0800 X-Google-Sender-Auth: GI-yAXW_py9A4PRRq9DHfEdVmGI Message-ID: To: Derick Rethans Cc: =?UTF-8?Q?Johannes_Schl=C3=BCter?= , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Comparable interface From: aharvey@php.net (Adam Harvey) (Omnibus reply, since Johannes's original e-mail hasn't yet dropped into my ever-so-flaky mail setup. I have read it in full on news.php.net, though.) > On Thu, 30 Sep 2010, Johannes Schl=C3=BCter wrote: >> What is this "more interesting stuff to come"? Nothing that's likely to be ready before the forthcoming release cycle. I really did just want the RFC writing practice, since I haven't done one within PHP's structure before. :) >> (*) Right now it is quite clear what happens if you read >> =C2=A0 =C2=A0 =C2=A0$a =3D=3D $b >> there are a few edge cases (0 =3D=3D "100000 mails ina thread") but over= all >> quite clear. With your patch "anything" might happen, which is hard to >> detect as we don't enforce strong typing, which would give a hint. Sure, but I think by that argument interfaces like Countable, Traversable and ArrayAccess would be out too. It is syntactic sugar, but I think it's useful syntactic sugar. One of the examples I toyed with tossing into the RFC was a date class, but I figured the argument against that is the obvious one of "people would use DateTime anyway". I think there are a range of potential uses here. 2010/9/30 Derick Rethans : > It sounds a little bit like operator over loading to me... I guess it is in a sense, since the comparison operators are by definition operators. I don't really see this is as starting any sort of slippery slope towards a full operator overloading implementation, though -- it's limited in scope, and really seems like a small, logical feature to make objects a little bit more useful to me. Adam