Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124079 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 5889C1A009C for ; Sun, 30 Jun 2024 07:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719732761; bh=60X+iv33JjWMkXA1xSHL4SIVr9uAc6o1qQXknFHc9JE=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=NUeDkkrSeBb8KJoyYrV1qI3K3T9nepiypLvwOeStWLZuG/aM9T00xH6/lyhA6tbV4 smLAJW89yjrYkMfTxkpLdQ0k/0HbB8lcwdao1pjtCg5gu8SC4h/qCtPhOBTtXqtZGa w+xRhD/qXkXeKjrvIk5h8+3i/8GalsBHuQpRIsUcEne7ebe829aWmG5wFgSk98N6Ws 9jQA1qHqVvEYvVg2Cb9jXH4wgjBwsO7ys8GkXz/GYso2EzuBkV6ISMY5qfE8kpVW6G BJHaJrGG1nUOGbaEOkq7EhKda/RwO53qaDDWFDf9q9XP1d/32iVcpMC2xZCuoLoIlb OfPlciUtOgOWw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 62BDF1805A1 for ; Sun, 30 Jun 2024 07:32:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-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,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 30 Jun 2024 07:32:39 +0000 (UTC) Received: from smtpclient.apple (115.153.159.133.rev.vmobile.jp [133.159.153.115]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id 7E521401D3; Sun, 30 Jun 2024 16:31:17 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1719732677; bh=60X+iv33JjWMkXA1xSHL4SIVr9uAc6o1qQXknFHc9JE=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From; b=R2I/7eQR7cGzUYAB4mtImRHE0rJvxfhosIo0eKfWbXxjMIEzMu2EcvpPyT/PbSnfe gmyFFUNbMO2acSbMb1hEkAteIXL4VyW7AOKROjc4LSuhmTkHX2Z5KgefFH/3a7ETlk L4fmDgiqKz1y/3m9jfTxbCeNkDjrsjcS+qQgFZ8A= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net Mime-Version: 1.0 (1.0) Subject: Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition Date: Sun, 30 Jun 2024 16:31:03 +0900 Message-ID: <1E19168D-BA9F-488E-825D-C2D94666450B@sakiot.com> References: <2e7f87d2-a2a1-47f4-a1f0-31cf490a2edf@app.fastmail.com> Cc: "Gina P. Banyard" , internals@lists.php.net In-Reply-To: <2e7f87d2-a2a1-47f4-a1f0-31cf490a2edf@app.fastmail.com> To: Rob Landers X-Mailer: iPhone Mail (21F90) From: saki@sakiot.com (Saki Takamachi) Hi, >> It seems like the "hack" I mentioned is still possible, am I misunderstan= ding something? >=20 > That=E2=80=99s always going to be a possibility, no matter what we do or h= ow we do it. I think it would be a rather pointless hack now that I can run t= he code. For the most part, the engine treats these as numbers and trying to= dodge that will land you in hot water eventually.=20 I'm not sure. Does this mean that such "hack" is unavoidable? And I don't really understand what "pointless hack" means. This would make s= ense if operator overloading was already allowed, but it isn't. >> And I don't understand the purpose of polyfills at all. If you're not usi= ng the GMP extensions and can't do operator overloading, won't you just have= a class with protected methods that are never used and don't actually do an= ything? >=20 > Ah, that could probably be clearer in the RFC, but you have to make it pub= lic to be able to use it. >=20 > It=E2=80=99s a bit clunky to use without the extension, but that=E2=80=99s= mostly because I didn=E2=80=99t want to get into OperandPosition from Jorda= n=E2=80=99s RFC. Many people were confused about it, so I=E2=80=99m just avo= iding it. This is very confusing me. Why does this need to be a child class of GMP? Regards, Saki=