Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128156 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 lists.php.net (Postfix) with ESMTPS id 710241A00BC for ; Mon, 21 Jul 2025 09:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753089013; bh=Z/pR3pZaZKxsu9p0CG8LaewBc/NfCAcKnguGWILU3Mo=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=J3FohKqufZhRD2LeskX9jIrSSMSWjDwgaJ6ej8e2KAXWRFvvgBaX9NNlnw03u9+yG 9UUnpLCPatT/6mXqlPYmXktzxtK7IsKN0PBQQd7dG1QTmaPzF9ZJ2LnFIdl0+1M0OV Yd7gYLpVt1Et7EqJ48T20Gma3O86DUXzi9JRuLI8/hhpTEg7KhJ77O3gJuMA13mGkO Krp9DHYRZOXZ45F00suNBcMAv2QrApR6jd2qMqQ9/jZgnCg4zPS6DZs55NoCKnjGBe kiagHeMtXuocLAjOo2K3IA/0dXXGWCZ1i2OTndNEbUFYixBJM1fGrsNq6YG9mjXJyB UU/PFG4FG7bgw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 05858180082 for ; Mon, 21 Jul 2025 09:10:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) 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,HTML_MESSAGE, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from avril.gn2.hosting (avril.gn2.hosting [84.19.162.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 21 Jul 2025 09:10:11 +0000 (UTC) Received: from avril.gn2.hosting (localhost [127.0.0.1]) by avril.gn2.hosting (Postfix) with ESMTP id 7AD7C1C40C7A; Mon, 21 Jul 2025 11:11:55 +0200 (CEST) Received: from smtpclient.apple (unknown [202.46.151.141]) by avril.gn2.hosting (Postfix) with ESMTPSA id C71041C40168; Mon, 21 Jul 2025 11:11:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nicksdot.dev; s=default; t=1753089114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/JlU7athFd/7UB/HYQrG1fqq153C9FHpjehQqCdGSV0=; b=KqTNlSp3kqrtQaNh6YOThfYP+coVxmGz6EsO4CM0T2neHbNOU+fAd2GqLX5B8uYmkJq6Gu 2KVSjNjqCVkHaOWJgBmuxdB/afATxdBx8+s60TuYNlUyh3pRtONBg3OdZJ9oXScq79b9+Q utyfJDorh3FObe8oZvaBnR+MPDdJ+sQZgXXeWZM2+2k7uCW8ubHcZJ3HYP+2wVZoLohrTD ngZbBCATKuBDGgjZKFNw4njvyGAcp2HQRir4RuPw7NORvo6XXTN/H3NiXVMDUkWVjBvQ54 ARNVVuYxnUod6yzulBpL3aV5r41EITVMhKcgxRI1Wr6jEqNBXgvhjh1+SjOOZQ== Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_93B991BB-3DDC-41A7-9166-92757B57B23B" Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: [PHP-DEV] [RFC] Readonly property hooks Date: Mon, 21 Jul 2025 16:11:39 +0700 In-Reply-To: <596384f8-580c-4f72-ad3a-5f517be60b16@gmail.com> Cc: php internals To: Niels Dossche References: <1e8634d7-ac1a-4025-b4e2-1948aabf5251@app.fastmail.com> <13B58381-AA61-4D38-A688-DD9E367ADE6F@nicksdot.dev> <96e0ea70-291e-4f0a-b449-acbaef16c099@bastelstu.be> <76059dd0-d27a-4207-9460-658175f54a99@app.fastmail.com> <5A1B6BCB-97AC-4D50-A38C-C7EE394E4EE1@nicksdot.dev> <596384f8-580c-4f72-ad3a-5f517be60b16@gmail.com> X-Mailer: Apple Mail (2.3826.600.51.1.1) From: php@nicksdot.dev (Nick) --Apple-Mail=_93B991BB-3DDC-41A7-9166-92757B57B23B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hey Niels, > On 21. Jul 2025, at 15:56, Niels Dossche = wrote: >=20 > On 21/07/2025 10:29, Nick wrote: >> @Niels >> I saw you voted =E2=80=9Cno=E2=80=9D for `set`. >> I double checked the full RFC discussion. You didn=E2=80=99t = participate at all until the very end.=20 >> Both mails were on a meta-level. None one your mails had any = arguments which would justify your vote. >> I don=E2=80=99t understand your vote. Would you mind to elaborate? >=20 > Hi Nick >=20 > The vote for me was lost at the proposal itself, not the discussion. > Property hooks left a bit of a bitter aftertaste for me, we're still = fixing opcache bugs regarding property hooks today, > and we had a particularly bad bug with the JIT where the JIT made some = assumptions that were broken because hooks could override properties. > We also regularly get reports on php-src of people being confused by = some of the behaviours of hooks. > Combine that with readonly, another complex feature, and I find it = hard to be in favour of any of this. > While I think it's still a great feature, it also proved to be much = more complex than initially thought, and it also shows that features > interact in unexpected ways with each other. >=20 > For me, the mental model of readonly is already complicated, and the = hooks are too, combine the two and you get IMO unintuitive behaviour > regarding immutability etc. Anyway, this is not a new argument. >>=20 >> Thank you. >>=20 >> *Cheers,* >> Nick >>=20 >>=20 >=20 > Kind regards > Niels >=20 Thanks for the detailed answer--I get it. I honestly would have appreciated to see you hop in with that in the = earlier state of the RFC. It would have been more productive from my point of view. Maybe next = time! >> As a new participant, I have difficulties to understand these kind of = =E2=80=9Cpolitics=E2=80=9D here. >=20 > For me there is no politics at play regarding my vote. > For a large chunk of RFCs, I actually don't even vote. > For this one, I decided long ago. >=20 >> What was this six weeks discussion exactly for if decisions = apparently are taken in =E2=80=9Cother channels=E2=80=9D that are not = the officially documented ones? >=20 > The decision for me was made on my own. > There was one brief discussion in the PHPF Slack that Larry started, I = briefly joined in there and there I told him about the mental model = issue that I described above. > A few others also were not happy with the complicated mental model. Neve mind me then. The =E2=80=9Cother channels =E2=80=9C argument = sounded weird to me because I had no idea what it means. My bad. -- Thank you. Cheers, Nick= --Apple-Mail=_93B991BB-3DDC-41A7-9166-92757B57B23B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hey Niels,

On 21. Jul 2025, at 15:56, Niels Dossche = <dossche.niels@gmail.com> wrote:

On 21/07/2025 10:29, Nick = wrote:
@Niels
I saw you voted =E2=80=9Cno=E2= =80=9D for `set`.
I double checked the full RFC discussion. You = didn=E2=80=99t  participate at all until the very = end. 
Both mails were on a meta-level. None one your mails had = any arguments which would justify your vote.
I don=E2=80=99t = understand your vote. Would you mind to = elaborate?

Hi Nick

The vote for me was lost = at the proposal itself, not the discussion.
Property hooks left a bit = of a bitter aftertaste for me, we're still fixing opcache bugs regarding = property hooks today,
and we had a particularly bad bug with the JIT = where the JIT made some assumptions that were broken because hooks could = override properties.
We also regularly get reports on php-src of = people being confused by some of the behaviours of hooks.
Combine = that with readonly, another complex feature, and I find it hard to be in = favour of any of this.
While I think it's still a great feature, it = also proved to be much more complex than initially thought, and it also = shows that features
interact in unexpected ways with each = other.

For me, the mental model of readonly is already = complicated, and the hooks are too, combine the two and you get IMO = unintuitive behaviour
regarding immutability etc. Anyway, this is not = a new argument.

Thank = you.

*Cheers,*
Nick



Kind = regards
Niels


Thanks = for the detailed answer--I get it.
I honestly would have = appreciated  to see you hop in with that in the earlier state of = the RFC.
It would have been more productive from my point of = view. Maybe next time!

As a new participant, I have = difficulties to understand these kind of =E2=80=9Cpolitics=E2=80=9D = here.

For me there is no politics at play regarding = my vote.
For a large chunk of RFCs, I actually don't even = vote.
For this one, I decided long ago.

What was this six weeks discussion exactly for if = decisions apparently are taken in =E2=80=9Cother channels=E2=80=9D that = are not the officially documented ones?

The decision = for me was made on my own.
There was one brief discussion in the PHPF = Slack that Larry started, I briefly joined in there and there I told him = about the mental model issue that I described above.
A few others = also were not happy with the complicated mental = model.

Neve mind me then. The =E2=80=9Cothe= r channels =E2=80=9C argument sounded weird to me because I had no idea = what it means. My = bad.

--

Thank = you.

Cheers,
Nick
= --Apple-Mail=_93B991BB-3DDC-41A7-9166-92757B57B23B--