Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98099 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49146 invoked from network); 31 Jan 2017 22:48:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2017 22:48:31 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.85 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.85 mx104.easyname.com Received: from [77.244.243.85] ([77.244.243.85:43602] helo=mx104.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/DD-51557-E3411985 for ; Tue, 31 Jan 2017 17:48:30 -0500 Received: from cable-81-173-135-7.netcologne.de ([81.173.135.7] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cYhDv-0007Zo-Iq; Tue, 31 Jan 2017 22:48:27 +0000 Reply-To: internals@lists.php.net To: php-internals , Adam Harvey Message-ID: Date: Tue, 31 Jan 2017 23:48:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-DNSBL-PBLSPAMHAUS: YES Subject: [RFC] Comparable From: php@fleshgrinder.com (Fleshgrinder) Hi :) I have a few questions regarding the comparable RFC: https://wiki.php.net/rfc/comparable Couldn't find the thread in my history and thus cannot respond directly to any of the past threads. Maybe not that bad after more than a year of silence. :) My question might sound silly but I am genuinely interested in the explanation: why `compareTo` and not `comparedTo` as method name? Is it simply because of Java? To me it sounds kind of wrong: if ($this->compareTo($other) === -1) { } Especially if we add a nice Ordering Enum with some real behavior to the game: if ($this->compareTo($other)->isLess()) { } Compare this to: if ($this->comparedTo($other)->isLess()) { } This gets close to what I would understand as proper English. Then again there might be valid reasons for the former name that I am not aware of?!? There are other things that I think should be added along with this RFC. However, I need to investigate a bit further first before going into detail here. -- Richard "Fleshgrinder" Fussenegger