Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116751 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50521 invoked from network); 1 Jan 2022 16:51:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jan 2022 16:51:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C03A81804C3 for ; Sat, 1 Jan 2022 09:57:48 -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.2 required=5.0 tests=BAYES_40,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-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 ; Sat, 1 Jan 2022 09:57:48 -0800 (PST) Received: by mail-lj1-f181.google.com with SMTP id by39so49416258ljb.2 for ; Sat, 01 Jan 2022 09:57:48 -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; bh=JX8ndlp0wuapb+R/HVwziVQ/A7uZsiaMhYnh5k3HS0c=; b=mzwqSkLhRTvEd4wsaTHNnp/eetGPxYu3XtfSB/obmOgx/MmfXH9ylJUWat8+b85/tO 4HRztxxaYwGN4UEazefzohMDnm3EgUGFSzFSW/GgafqhJPvlekv8E8l4Y3EH55xqEpOJ DRYNA50XWiGpSEQQuSk4vaKG0n+JTRM6aRQTQEYJ13gULHKUNJ1j5A235xtL/Efnnyge 3IpC913vzuRid2mF9uTHCtkZiS++fJhP9htLwVSVHy7oj09pugsoqRwcAe/VDg61oF55 fhW/l6BbJSiHEkKcWUQCQfIt6McDKyiCZRO5Sh26c3rmrI0FCPns58CjuMpGqp48H+pJ GDqw== 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; bh=JX8ndlp0wuapb+R/HVwziVQ/A7uZsiaMhYnh5k3HS0c=; b=otZfRoF0fhQR6rbN7WrMf5VVkDXLJQ0tX8/EldBQXmN2myBZ4v93uNstedwqB3DI4i CqPdZn53VGw2KSc6BYCVQxY4KF00Wky3R0ERYDI1G0H5Xk7vRxYuUmp3PLy64GpRXq9U 9QYh9OMxIrhE9BFJ67FbmZkO/y4lXQvedk1mXJRdwpydVxuD4bdhpXCW+IOXdx97T4xp yG5eCCo27Bofg6CY9bWHvCin+XWrivKSl+OF4enPcFBnqsmmSKk4OR2r5w4rYT5ko/HH IJxZe3nnfeRj7TYv3xhXIDAAfLSAB5DjD9ASyyP2FKwDCaswodeyBxdoqNdEM4atdYOo mQnw== X-Gm-Message-State: AOAM532lqa1bwJsZQC1xfkLUq6C/FLWbxGufQKOdRzZgHQHi5RT8iOJH nC0eIPZ5Ruj/To2OBwJdDZSS9jfCd+WA3jOrVoxuqYKr5vM= X-Google-Smtp-Source: ABdhPJxiAMA1Aq4WdPNWJ1HqN/b9HlwXLcI8BytFZOdzaOKWURW2NAhTnDuu9nE8560goE73kWaWt7fhuJASKutAdVo= X-Received: by 2002:a2e:9c0a:: with SMTP id s10mr21651372lji.434.1641059866350; Sat, 01 Jan 2022 09:57:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 1 Jan 2022 09:57:24 -0800 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000006398fb05d4890697" Subject: Re: [RFC] User Defined Operator Overloads (v0.6) From: jordan.ledoux@gmail.com (Jordan LeDoux) --0000000000006398fb05d4890697 Content-Type: text/plain; charset="UTF-8" On Thu, Dec 9, 2021 at 12:11 PM Jordan LeDoux wrote: > Hello internals, > > I last brought this RFC up for discussion in August, and there was > certainly interesting discussion. Since then there have been many > improvements, and I'd like to re-open discussion on this RFC. I mentioned > in the first email to the list that I was planning on taking a while before > approaching a vote, however the RFC is much closer to vote-ready now, and > I'd like to open discussion with that in mind. > > RFC Link: https://wiki.php.net/rfc/user_defined_operator_overloads > > There is a patch for this RFC, however the latest commits are not > playable. It will build, but with various problems which are being worked > on related to enums. The last playable commit can be found by checking out > this commit: > > > https://github.com/JordanRL/php-src/commit/e044f53830a9ded19f7c16a9542521601ac3f331 > > This commit however does not have the enum for operator position described > in the RFC. It uses a bool instead with true being the left side, and false > being the right side. > > Implementation details still left: > - There are issues related to opcache/JIT still, so if you want to play > around with the playable commit disable both. > - Reflection has not been updated, but the proposed updates necessary are > described in the RFC. > > It is a long RFC, but operator overloads are a complicated topic if done > correctly. Please review the FAQ section before asking a question, as it > covers many of the main objections or inquiries to the feature. I'd be > happy to expand on any of the answers there if prompted however. > > Jordan > It seems that most of the discussion and questions have happened. As such, I'll be opening voting on the RFC on January 3rd unless anyone believes there are further outstanding issues which should be discussed prior. I've put together a small set of rules for operator overloads, guidelines for implementations, that the PHP community could use to start learning the limitations of this feature while the implementation is being finished and the documentation for PHP.net is being worked on: https://github.com/JordanRL/operator-overloads-in-php/blob/master/README.md Jordan --0000000000006398fb05d4890697--