Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116778 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2358 invoked from network); 3 Jan 2022 15:05:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2022 15:05:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C28131804C4 for ; Mon, 3 Jan 2022 08:12:33 -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=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 3 Jan 2022 08:12:33 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B9BA15C00C5 for ; Mon, 3 Jan 2022 11:12:32 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute6.internal (MEProxy); Mon, 03 Jan 2022 11:12:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=cFuFhf OHRK8dSTtfC37+96v7e7UN0xhqZiwnNdP0oZI=; b=gKTHvDUY/Ieec0c7VwLd75 TWIHuLMiVe6QgNJ5CHK+Mcu6ZrQvaZsRyMJtGFmc6a4r+f6UnRt7mPGEhP4jt+ys YIonTZlgSLOqEy8L7luGe4TEi5+9fp+wweewuJLExeMXTdoXQuAr+mUF+qwz5zLN 41a2+Yqr+f14yI9hIUmGUwQnRI73lsQSoOIM0SQZA013n5B98wAMjA6znuZHdPNI HF/ftkTO/+J5qz470J26GivtrI/zt5GjO4DUTP0mvcGXnog/Y3k7/19u6XpC3KWc S64zRoLp5hNbLSo3WPRYGe8klnZq71LmNXkGT0Wxj0CuC0wsAuNEjW0hgWKf7Hfw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefuddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 771E4AC0E99; Mon, 3 Jan 2022 11:12:32 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4525-g8883000b21-fm-20211221.001-g8883000b Mime-Version: 1.0 Message-ID: In-Reply-To: <3225c921-9b26-d2e0-f76f-45fff6f5a12a@processus.org> References: <3225c921-9b26-d2e0-f76f-45fff6f5a12a@processus.org> Date: Mon, 03 Jan 2022 10:12:12 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [VOTE] User Defined Operator Overloads From: larry@garfieldtech.com ("Larry Garfield") On Mon, Jan 3, 2022, at 9:52 AM, Pierre wrote: > I personally tend to agree with everything that Marco said. Especially > regarding the fact that it's adding huge complexity to the language > itself for mostly edge cases. > > I'd argue there's many much more valuable features that could be added > to PHP before operator overload, such as generics, rationalized > collection API and scalar objects with methods for example (which all > could be magnificent tools for improving the operator overload RFC). Those are all independent of operator overloading. There's zero reason one needs to come before/after any other. Everyone wants generics, but they're really hard or Nikita would have implemented them already. This is a non-argument. 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. --Larry Garfield