Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124076 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 1B2041ADA7B for ; Sun, 30 Jun 2024 06:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719730306; bh=vyGRcFwC5yCy1/FCcbqX2vUKWYJEPzleq75G4QS7+PU=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=jCXgkLrMXkuWn4qfTaDzxkPQrfT0am58iA416ZFfhkMiUH6FjJFf2G27rexzqWum1 Z/YtE6ngDCKnsNq9iWLjMH+hIjDCVef9TW2LuvMfgDShjQp2x1tdP6PWFM5e8Bvaad EoZ4EeQnGzY96w9uT45cP6o+m0jQ0hMee7cTVgYuELP6nJide7MjStItgKwpeiDyzv nRol5i68yQwsA9fuu61AyYJmFzAUR2e9dUerFoRuc1sXcqZxKApYQhuzr3aSRAZtUu oX5m445trU6g6eoPrkWgg880hF+5HyhC5h1aDRt6zU6qcKRYJgY+QdPYpfW/JLphfk BWMxYKnwdGeUw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EB6A2180E53 for ; Sun, 30 Jun 2024 06:51:43 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,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 fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 06:51:40 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 990091380253; Sun, 30 Jun 2024 02:50:20 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Sun, 30 Jun 2024 02:50:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1719730220; x= 1719816620; bh=vyGRcFwC5yCy1/FCcbqX2vUKWYJEPzleq75G4QS7+PU=; b=i jRQhva7ut1aaE31T6T3R8LN21jR7r8RjNRgPlnyyvJYNsKRjfprfPE42YALBhKRV MAQTzIel31UXVbWz5jAlQt6Kw/TTxegp1ouMP3Q3wLMUxZuH8aWlDmgGY+5TEpeM hl2RGLmJlhhii0Cbdc4cKLG/e00YTf9H/akMBRVlAfMQPRxwjRWHnuQf17Dpkt8k hVRaInaj6I4sQ6l80hyFQACOt5+TwnX6yUUSg7SrMa+2/9tsx7VcrCzn7lnAc9wQ oqP+G9FNVeLACvQRZia0FpmTaoq9Hyd5FaelZfosbijhSEfcLe1G3Pto+yzOHP28 DAFINBTZHzo5USztN9Zfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1719730220; x=1719816620; bh=vyGRcFwC5yCy1/FCcbqX2vUKWYJE Pzleq75G4QS7+PU=; b=AP4M41a4jkGlVyfoW8MNVgDkPot8R1yWbu+XxgruG0AN N2x1Edx2W9JUnh5931TrqwMh4gccZFdGA49KzA5Az3iIUqXlPfxsYgvYCpn01mbX mC9Q9SAF1Q8ZHjkYsr+AWf6dcwyrAryeX/4mStpOEosCqwlVCwpWLV3bD9CyWOOU zdI2DIuaNfWA1iOXx4N3uh5mAJWVVoHWg/zO8R6YgPwuUwb8hfWyWzNINIJx6fJ0 hH/prrIX0Aa5uyTm/PDLanYWbpAa9bLtehSgxjQVlFJDM8CGlG5pqZx2cFYHnoaj pLwvCp+GqRsHtoMIwYf21lcUsRTS37AFQbIgG4YKpA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsegrtderreerreejnecuhfhrohhmpedftfho sgcunfgrnhguvghrshdfuceorhhosgessghothhtlhgvugdrtghouggvsheqnecuggftrf grthhtvghrnhepvdehkeetleevteefveegkefgffdvuefhleevhedvteeigfegtdefjeeh tefghfeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprhhosgessghothhtlhgvugdrtghouggvsh X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D8C0115A0092; Sun, 30 Jun 2024 02:50:19 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-538-g1508afaa2-fm-20240616.001-g1508afaa Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <4e76abb0-72ed-4b1f-a5c8-163c76533bde@app.fastmail.com> In-Reply-To: <2e7f87d2-a2a1-47f4-a1f0-31cf490a2edf@app.fastmail.com> References: <256b79d4-713c-4547-953d-8bc8291da9f3@app.fastmail.com> <50B4D759-03D3-45CA-87C0-757AFC4B67D0@sakiot.com> <2e7f87d2-a2a1-47f4-a1f0-31cf490a2edf@app.fastmail.com> Date: Sun, 30 Jun 2024 08:49:57 +0200 To: "Saki Takamachi" Cc: "Gina P. Banyard" , internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Operator Overrides -- Lite Edition Content-Type: multipart/alternative; boundary=72b2bf80d79049289577bf20c409068e From: rob@bottled.codes ("Rob Landers") --72b2bf80d79049289577bf20c409068e Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, Jun 30, 2024, at 06:59, Rob Landers wrote: >=20 >=20 > On Sun, Jun 30, 2024, at 01:28, Saki Takamachi wrote: >> Hi, >>=20 >> > Hello internals, >> >=20 >> > I've updated the RFC to include final-ish examples (barring any fur= ther constructive feedback), a prototype implementation, and an objectio= ns section. >> >=20 >> > Cheers, >> >=20 >> > Rob >>=20 >> It seems like the "hack" I mentioned is still possible, am I misunder= standing something? >=20 > That=E2=80=99s always going to be a possibility, no matter what we do = or how we do it. I think it would be a rather pointless hack now that I = can run the code. For the most part, the engine treats these as numbers = and trying to dodge that will land you in hot water eventually.=20 After playing with the code and seeing what I could get away with, makin= g the GMP class `readonly` appears to prevent many abuses, so I have ame= nded the RFC and prototype code. >=20 >>=20 >> And I don't understand the purpose of polyfills at all. If you're not= using the GMP extensions and can't do operator overloading, won't you j= ust have a class with protected methods that are never used and don't ac= tually do anything? >=20 > Ah, that could probably be clearer in the RFC, but you have to make it= public to be able to use it. I've iterated it a few times in the text of the RFC. =E2=80=94 Rob --72b2bf80d79049289577bf20c409068e Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Sun, Ju= n 30, 2024, at 06:59, Rob Landers wrote:


On Sun, Jun = 30, 2024, at 01:28, Saki Takamachi wrote:
Hi,

> = Hello internals,

> I've update= d the RFC to include final-ish examples (barring any further constructiv= e feedback), a prototype implementation, and an objections section.
<= /div>

> Cheers,
> =
> Rob

It seems like the "= hack" I mentioned is still possible, am I misunderstanding something?

That=E2=80=99s always going to b= e a possibility, no matter what we do or how we do it. I think it would = be a rather pointless hack now that I can run the code. For the most par= t, the engine treats these as numbers and trying to dodge that will land= you in hot water eventually. 

After playing with the code and seeing what I could get away with,= making the GMP class `readonly` appears to prevent many abuses, so I ha= ve amended the RFC and prototype code.



And I don't understand th= e purpose of polyfills at all. If you're not using the GMP extensions an= d can't do operator overloading, won't you just have a class with protec= ted methods that are never used and don't actually do anything?

Ah, that could probably be clearer in = the RFC, but you have to make it public to be able to use it.
<= /blockquote>

I've iterated it a few times in the text= of the RFC.

=E2=80=94 = Rob
--72b2bf80d79049289577bf20c409068e--