Re: [RFC] Asymmetric Visibility, v2
| From: | Rob Landers | Date: | Sun, 21 Jul 2024 09:21:24 +0000 |
| Subject: | Re: [RFC] Asymmetric Visibility, v2 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124528@lists.php.net to get a copy of this message | ||
On Sat, Jul 20, 2024, at 23:51, Larry Garfield wrote:
> On Sat, Jul 20, 2024, at 7:22 AM, Rodrigo Vieira wrote:
> > Will the alternative syntax on hook not even be put to a vote?
>
> It was, a year and a half ago when Aviz was first proposed. The preference was split, but
> leaned toward the prefix-style syntax. So we went with that. I don't think we'll ever
> get everyone to want the same syntax, but we're using the one that was both somewhat more
> popular, and (as discussed in the RFC) arguably superior.
>
> As the "comments in yield from" thread has shown, *any* even slight change to
> PHP's syntax will require work from static analysis tools. That's the nature of the
> problem space, regardless of the syntax specifics.
>
> --Larry Garfield
>
Just to play devil’s advocate, it was also before we had property hooks who advertised itself as a
way to “wrap and guard access to object properties” but we are simply ignoring their existence
here.
— Rob