Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116783 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11888 invoked from network); 3 Jan 2022 16:00:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2022 16:00:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B70F618053A for ; Mon, 3 Jan 2022 09:07:13 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS16276 94.23.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 3 Jan 2022 09:07:13 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id 3028351005CD; Mon, 3 Jan 2022 17:07:12 +0000 (UTC) Message-ID: <40a1e5fa-396d-d9ef-93ab-6fcfb5054092@processus.org> Date: Mon, 3 Jan 2022 18:07:11 +0100 MIME-Version: 1.0 Content-Language: en-US To: Larry Garfield , php internals References: <3225c921-9b26-d2e0-f76f-45fff6f5a12a@processus.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] [VOTE] User Defined Operator Overloads From: pierre-php@processus.org (Pierre) Le 03/01/2022 à 17:12, Larry Garfield a écrit : > Also, people keep talking about edge cases. In my experience, "are these two objects equal" (for some object-specific definition of equal) is very much *not* an edge case. I may have less use for overloading % as I don't use advanced math that much, but I compare things all the frickin' time and that would be incredibly useful day to day. I forgot to answer to that, specifically. I'd much more prefer to have an explicit `equals(object $other): bool` (magic or not, really I do not care) single method for equality only, that'd be great. In that sense, I much preferred specific RFC about `__equalsTo()` or `__compareTo()` alone that a huge generic operator overload RFC. I think both could actually be separated, it wouldn't be that weird. Best regards, -- Pierre