Again: Asymmetric Visibility and Accessor syntax

php.internals

Karoly Negyesi

3 years ago
> We are therefore going to proceed with `public private(set)`, the same
syntax as Swift and the current RFC text use. It seems my previous email went to /dev/null. This is incomprehensible. Go with public(get) private(set) please. "public private" makes no sense.

Larry Garfield

3 years ago
On Sun, Sep 18, 2022, at 3:00 AM, Karoly Negyesi wrote:
>> We are therefore going to proceed with `public private(set)`, the same > syntax as Swift and the current RFC text use. > > It seems my previous email went to /dev/null. > > This is incomprehensible. > > Go with public(get) private(set) please. > > "public private" makes no sense.
The Swift-style syntax should be read as "public visibility for all operations unless otherwise specified, and then specify private for set". Should some other operation be broken off as individually controllable in the future, the syntax will expand to support it without further complication. --Larry Garfield