Re: [RFC] Readonly property hooks
| From: | Niels Dossche | Date: | Mon, 21 Jul 2025 08:56:56 +0000 |
| Subject: | Re: [RFC] Readonly property hooks | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128155@lists.php.net to get a copy of this message | ||
On 21/07/2025 10:29, Nick wrote:
> @Niels
> I saw you voted “no” for
set.
> I double checked the full RFC discussion. You didn’t 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’t 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.
> As a new participant, I have difficulties to understand these kind of “politics” 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 “other
> channels” 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.
>
> Thank you.
>
> *Cheers,*
> Nick
>
>
Kind regards
Niels