Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116788 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19658 invoked from network); 3 Jan 2022 16:31:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2022 16:31:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 74D0B18054C for ; Mon, 3 Jan 2022 09:38:40 -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=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (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 09:38:40 -0800 (PST) Received: by mail-ed1-f50.google.com with SMTP id y22so138662919edq.2 for ; Mon, 03 Jan 2022 09:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KXns/UCtFtmoUk4hlhYMzIqyhB0VxI6l2Sl4cKt2Ae4=; b=DvhtiJhNGFzARqW0yo8sbSLLqMZ+HT+8sVTe/wYu7fYjdnGBk+s+1SH/485FXCGyJi WHSm0fgxvNzJu6gFiAbc0f74en4JbaTTLZVNe2yvaXzfDVUrmdfJGjdaubVqS/aBjWcn RU4xAZW8bJYWjOJHcJpd8J9TIDrAfN/nmFcZbf6r0tL0aT/k2VDDhNoqyv7GV8L/BDfM g5mJLE5D+Pwl5gEFL9lSGRQ/3E34NAkW1JJS2IrbsmZIy/k2P67s7JQOKH2xKWlb/tek uUjFvcgL+6zVqzvpxpaMIWnNAN0Ggbw5VyTo3u0GSUE9LrLfYGLRXv8gVWHUYtD5+lqW myCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KXns/UCtFtmoUk4hlhYMzIqyhB0VxI6l2Sl4cKt2Ae4=; b=ozO8ZU/rHVuHnCBWpv2k0YyzYZTWI7cLS88UYgRpALLPYb3Gg5GAxDhXzZQcsedX+L kFYsQna23t205I3lJJKOPuNs74wC3uhXsrJgqmtcZ4QWtmnGILpe9qRmeOkk+y3aM6Eq 0G6e+SRWxgXrIe/SByeqM7u2T3PARjwPaq616t9AOtgDSXBQUBjWnm5BD48Y2H7hcCaZ g/ESJ/ARpntuEQm0PKOf/ccfuJCEvt5x/4UpYpyUm18VKgCBiOMECFs/5ImOlN+xbC34 D8h9Z9Lt92LSN6fxFrciWuw7RCa1wJlukBcxs+LIunIg40F258KQDGjVqGIWZFZG7hYK MdTw== X-Gm-Message-State: AOAM532K4gwUOxb1SYFBjt//tLXGKNnYWlBAcQR4WF+ju/mBAnAcOnDQ EzeIrTvB7WLFj+iHwIQvJ18rApHXQIvNXmrkBGk= X-Google-Smtp-Source: ABdhPJwAheew2mxEVITn0pRKept/uOQXww2u/cGNyae9rVyozTOK7QsSibcsZX3Em3+Jhnvl7wj5ZeBQtwDvrHE5Wfw= X-Received: by 2002:aa7:d6d6:: with SMTP id x22mr45752875edr.132.1641231518625; Mon, 03 Jan 2022 09:38:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 3 Jan 2022 18:38:22 +0100 Message-ID: To: Jordan LeDoux Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000a9728805d4b0fd3a" Subject: Re: [PHP-DEV] [VOTE] User Defined Operator Overloads From: nikita.ppv@gmail.com (Nikita Popov) --000000000000a9728805d4b0fd3a Content-Type: text/plain; charset="UTF-8" On Mon, Jan 3, 2022 at 1:14 AM Jordan LeDoux wrote: > Hello internals, > > I've opened voting on > https://wiki.php.net/rfc/user_defined_operator_overloads. The voting will > close on 2022-01-17. > > To review past discussions on this RFC and the feature in general, please > refer to: > > - https://externals.io/message/116611 | Current RFC discussion > - https://externals.io/message/115764 | Initial RFC discussion > - https://externals.io/message/115648 | Pre-RFC discussion and > fact-finding > > Jordan > Voted No on this one. I did support the previous proposal on this topic, but I don't like the changes that this iteration has introduced relative to the previous proposal. The part that I dislike most (and that I consider an exclusion criterion regardless of any other merits of the proposal) is the introduction of a new "operator +" style syntax. I found the motivation for this choice given in the RFC rather weak -- it seems to be a very speculative forward-compatibility argument, and I'm not sure it holds water even if we accept the premise. There's nothing preventing us, from a technical point-of-view, from allowing the use of some keyword only with magic methods. On the other hand, the cost of this move is immediate: All tooling will have to deal with a new, special kind of method declaration. I'm also not a fan of the OperandPosition approach, though I could probably live with it. The previous approach using static methods seemed more natural to me, especially when it comes to operators that do not typically commute (e.g. subtraction). Regards, Nikita --000000000000a9728805d4b0fd3a--