Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116611 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38984 invoked from network); 9 Dec 2021 19:11:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2021 19:11:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 68F66180540 for ; Thu, 9 Dec 2021 12:12:04 -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.6 required=5.0 tests=BAYES_50,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-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 ; Thu, 9 Dec 2021 12:12:04 -0800 (PST) Received: by mail-lf1-f44.google.com with SMTP id l22so14164203lfg.7 for ; Thu, 09 Dec 2021 12:12:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=4LL4Q/1OhaMMPPXWO+5N+5Wy8AG08ICvC5+cdPEp5/g=; b=ac3yOWMy23IkLkbiJ0MhaTpVmIrJTXRSWebZIkK5pH3bfvL087NA+CSxHyLWzsFJ4Y 2KhxD9yr29m7mVHgeMX6hsWhEnfLIx0mjh2Eaa2C2uLLuT+R6ExO4FTnOpSSIV/t7rda jbPSuZ21clrZycnrABZLX5BW0wDyZdydloJOptEwrs8+uxLodpxFnW0uWT8I3U7sLmf9 DWaDgI6NPN75ZRJNk0bZEsNka9fqhx8M6LdEoMtguxlF3p6bp5Ou1T0hgWnR2UIAawWK hmmL0GuuUY7hkEwDQSxobnudu4aooD0S1wDWlQFOr1eII7FFL11FOIpmODVO6voPOsUs LQqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4LL4Q/1OhaMMPPXWO+5N+5Wy8AG08ICvC5+cdPEp5/g=; b=jIOmmIvgo3GO9aA8lGHRr9Qp6W9M199u4QlYPF743FYA5Khh0OijD5i41ojP0F/KiG P+GYMJYqpJn495sWzOSL1KpIU7lhRswHBcpJK10Se1hViwOl0utCZSmJUk420GqDLJBB bZ64WHonD/bLaSiqXsRW0mfyFKgrRsOFnoi86Q4y8/mqHAwgBApAcbPajFM6scFAsgow 5PunPtIL7cJbAnQMv94ZuzKNSDpvRl6b2sOgzlSqxoDIqIHXEFa5A7NaO5MuZs/1Em39 Z4ZLz7By9+BoXxxjVg+Nu6x1rmOnex2TDFD8TswkRp2dHveKuK2T7r/9fbBy/4Km85Dm afrw== X-Gm-Message-State: AOAM530vGPxYyu9YHxnO5XT0dJQwg/VCiM8n2Ue9V2URJURqcu91OfTF GQK+5oYSiiWT4ogew++4pz3KaclNxfr33RmWjLYIJikDJHk= X-Google-Smtp-Source: ABdhPJyVuRLZI+L5+lufbOt7cEG2+Yjir8V7lvzH6GOh+qljmsnX3u3wfm5/8LegtLOpeAHqwW2UhoXazEgfgooJmac= X-Received: by 2002:a05:6512:1090:: with SMTP id j16mr7972248lfg.568.1639080722146; Thu, 09 Dec 2021 12:12:02 -0800 (PST) MIME-Version: 1.0 Date: Thu, 9 Dec 2021 12:11:51 -0800 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000033a92105d2bc38f7" Subject: [RFC] User Defined Operator Overloads (v0.6) From: jordan.ledoux@gmail.com (Jordan LeDoux) --00000000000033a92105d2bc38f7 Content-Type: text/plain; charset="UTF-8" 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 --00000000000033a92105d2bc38f7--