Re: [RFC] Asymmetric visibility
| From: | Rowan Tommins | Date: | Sun, 07 Aug 2022 10:34:04 +0000 |
| Subject: | Re: [RFC] Asymmetric visibility | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118362@lists.php.net to get a copy of this message | ||
On 5 August 2022 21:04:34 BST, Paul Dragoonis <dragoonis@gmail.com> wrote:
>2. when I opened the RFC and looked at the syntax, I wasnt able to
>intuitively (self documenting code) figure out what and why was going on.
>
>3. The syntax is heavily implicit as to what each keyword and syntax means,
>so the general PHP developer would struggle or mis understand what is going
>on.
Can you expand on where you think the ambiguity / implicitness is? As I understand it, the RFC is
proposing exactly three new combined access levels:
- "public private(set)"
- "public protected(set)"
- "protected private(set)"
Although aesthetically it will take a bit of getting used to, it seems to me pretty clear that the
first means "mostly public, but private if you want to set it", and so on.
The only thing I can think of that could be described as "implicit" is that accessing a
property by reference is considered a "set" operation, which I'm not sure how any
implementation could avoid.
Regards,
--
Rowan Tommins
[IMSoP]