Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121425 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54827 invoked from network); 19 Oct 2023 07:14:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Oct 2023 07:14:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 22590180044 for ; Thu, 19 Oct 2023 00:14:27 -0700 (PDT) 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.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, KHOP_HELO_FCRDNS,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS16276 192.99.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mail.processus.org (ns563681.ip-192-99-44.net [192.99.44.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 19 Oct 2023 00:14:26 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------p4xVImhWkuEoPdnORnlrlCJt" Authentication-Results: mail.processus.org; auth=pass smtp.mailfrom=pierre-php@processus.org Message-ID: <712f1499-77cd-4897-bc8b-e13468d5c598@processus.org> Date: Thu, 19 Oct 2023 09:14:22 +0200 MIME-Version: 1.0 Content-Language: en-US To: Jordan LeDoux Cc: someniatko , php internals References: In-Reply-To: X-Spamd-Bar: / Subject: Re: [PHP-DEV] Custom object equality From: pierre-php@processus.org (Pierre) --------------p4xVImhWkuEoPdnORnlrlCJt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 18/10/2023 à 22:22, Jordan LeDoux a écrit : > > While I (obviously) appreciate the goal of the proposal here since I > wrote the gigantic operator overload RFC the last time it was > proposed, I do not support this idea here for one very simple reason: > it is a clunky, work-around implementation to try and get the benefits > of operator overloads without actually doing it. Even if I don't really like operator overload, I would very much prefer the gigantic operator overload to pass than a band-aid patch with a new operator, I'm all in for consistency. > > The need to control comparisons is real and obvious. So long as voters > are categorically opposed to actual operator overloads no matter the > implementation, as represented here by you Pierre but by no means a > position that only you hold, I don't think we should be looking for > ways to get the functionality through hacks like this. It may get > passed in the short term and get PHP developers the equality > comparison control that objects desperately need, but it makes all > future improvements almost impossible to do. Maybe I don't master english enough and I can speak to strictly sometime. If an operator overload RFC that doesn't have any blind spot or weird edge case happens, I'd be happy to see it pass, at least it would close bike shedding around this topic and life would continue happily. I can't vote, but if I could, I wouldn't vote against a proper, robust, and easy to debug for developers operator overload RFC, I would simply abstain, because even if I personally don't like it, lots of people want it and I'm simply one among millions of PHP users, I don't want anyone to be frustrated. The most important thing in my previous message I wanted to say was that the "~" symbol refers to something "approximate" in many contexts, in my opinion it's not the right choice for an equality operator. My opinion is either go for a full-on proper operator overload or simply don't. Regards, -- Pierre --------------p4xVImhWkuEoPdnORnlrlCJt--