On Tuesday, 27 February 2024 at 23:17, Larry Garfield <[email protected]>
wrote:
> I genuinely don't understand the pushback on $value. It's something you learn
> once and never have to think about again. It's consistent.
>
> Ilija jokingly suggested making it always $value, unconditionally, and
> allowing only the type to be specified if widening:
>
> public int $foo { set(int|float) => floor($value); }
>
>
> Though I suspect that won't go over well, either. :-)
Same, I don't understand the pushback on $value, for me this seems clearer and
less confusing than the existing $this variable when I was first learning about
OOP.
And I would be in favour of just making it always $value, if people feel that
strongly about being able to name it with a custom name they could propose this
as a follow-up RFC.
One thing the RFC should note, which I would expect to be the same as the array
cast, is how do backed/virtual properties interact with
get_mangled_object_vars()
Best regards,
Gina P. Banyard