Re: [RFC] Asymmetric Visibility, v2

From: Date: Fri, 31 May 2024 13:11:46 +0000
Subject: Re: [RFC] Asymmetric Visibility, v2
References: 1 2 3 4  Groups: php.internals php.internals 
Request: Send a blank email to [email protected] to get a copy of this message


> Le 30 mai 2024 à 12:16, Vincent de Lau <[email protected]> a écrit :
> 
>> 
>> We went through a bunch of syntax variations last year, including "public
>> private", "public:private", and "public private:set", plus a few
>> others.
>> In an RCV poll, public private(set) was the favorite. (See link at the end
>> of the RFC.)  It also allows for extension to other operations and scopes,
>> and for the short-hand syntax.  Many of the other options did not support
>> those.  Thus we stuck with the known syntax that had the most flexibility
>> and most support.
> 
> Would it make sense to do another RCV poll now that hooks are accepted, after lengthy
> discussion over its syntax? 
> 

At the time the poll was conducted, it was already known that a hooks RFC was in preparation, that
could be compatible with either option, syntax-wise. Now, we have hooks that are compatible with
both options, syntax-wise. I don’t think that would change the aesthetic preferences of people.

But now, we have indeed more information, namely detailed technical information on how the two
features (hooks and aviz) interact effectively with references/arrays/readonly. At the time the poll
was conducted, I was *moderately* in favour of the Swift-style syntax, mostly based on the general
principle that things that are logically orthogonal should be implemented as orthogonal. If the same
poll is done today, I will be *strongly* in favour of the Swift-style syntax, because I know more
precisely how both features interact with arrays and readonly.

—Claude



Thread (57 messages)

« previous php.internals (#123470) next »