Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49867 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5528 invoked from network); 5 Oct 2010 03:31:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2010 03:31:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain l-i-e.com designates 67.139.134.202 as permitted sender) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:2604] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/9B-18530-FFB9AAC4 for ; Mon, 04 Oct 2010 23:31:12 -0400 Received: (qmail 68057 invoked by uid 98); 5 Oct 2010 03:31:15 -0000 Received: from localhost by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.05 ( Clear:RC:1(127.0.0.1):. Processed in 0.039585 secs); 05 Oct 2010 03:31:15 -0000 Received: from localhost (HELO www.l-i-e.com) (127.0.0.1) by localhost with SMTP; 5 Oct 2010 03:31:14 -0000 Received: from webmail (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Mon, 4 Oct 2010 22:31:14 -0500 Message-ID: In-Reply-To: References: <1285856641.16846.92.camel@guybrush> <1286115365.2606.302.camel@guybrush> <1286116661.2606.313.camel@guybrush> Date: Mon, 4 Oct 2010 22:31:14 -0500 To: internals@lists.php.net User-Agent: SquirrelMail/1.4.21 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] RFC: Comparable interface From: ceo@l-i-e.com ("Richard Lynch") On Sun, October 3, 2010 12:34 pm, Gustavo Lopes wrote: > * The current behavior for >, <, etc. is completely useless. It's > unpredictable and it doesn't even establish a total order: > > $a = new stdclass; > $a->prop = null; > $b = new stdclass; > $b->prop2 = null; > > var_dump($a > $b); //false > var_dump($a == $b); //false > var_dump($b > $a); //false Errrr. Which one of these would you expect to be "true"?... They're sure not equal, right? And what would make $a or $b "greater" than the other? I mean, *WHY* would you expect one of those to be "true", if you do expect one of them to be "true"? I sure can't find any logical a priori ordering, total, partial, or otherwise. Last time I checked, there was no "rule" that any set/graph or other mathematical collection had to have a defined ordering, even partial. But it's been ages since I got my Honors Math degree, so maybe they changed the rule while I wasn't looking... :-) -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE