Re: [Vote] Asymmetric visibility v2
| From: | Theodore Brown | Date: | Mon, 05 Aug 2024 13:49:25 +0000 |
| Subject: | Re: [Vote] Asymmetric visibility v2 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124768@lists.php.net to get a copy of this message | ||
On Fri, July 26, 2024 at 12:25 Larry Garfield wrote:
> Voting for Asymmetric Visibility is now open.
>
> https://wiki.php.net/rfc/asymmetric-visibility-v2
Hi Larry and Ilija,
Thank you for all your work on this RFC!
One part that doesn't make sense to me is this sentence near the end in the "Readonly is
incompatible with inheritance" section:
> With asymmetric visibility, the
readonly usage here can be
> replaced with protected protected(set) or readonly
> protected protected(set), avoiding the need to double-declare properties.
protected protected(set) just removes readonly, and is the same as
protected, right? So couldn't such a change be done now without asymmetric
visibility?
And the change to protected protected(set) readonly as shown in the example also seems
unnecessary, since earlier in the RFC it says that readonly will be changed to imply
protected(set) rather than private(set). So it seems that no change is
needed to the abstract class here - the properties can remain protected readonly, and
the implementation can be simplified since readonly properties will now imply
protected(set).
Or have I misunderstood something here?
Thanks,
Theodore