Re: [RFC] Asymmetric Visibility, with readonly

From: Date: Thu, 05 Jan 2023 20:18:42 +0000
Subject: Re: [RFC] Asymmetric Visibility, with readonly
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-119235@lists.php.net to get a copy of this message
On Fri, 25 Nov 2022 at 00:07, Larry Garfield <larry@garfieldtech.com> wrote: > > On Sun, Nov 20, 2022, at 7:20 AM, Dan Ackroyd wrote: > > Hi Larry, > > > > Regarding the syntax, up until now PHP has only supported the letters > > a-z and underscore in keywords. > > > > I realise this is an aesthetic thing, but "private(set)" looks like a > > function to me, and not a keyword. I saw the previous poll, and it > > didn't include options for either protected_set/private_set or > > protectedset/privateset. > > > > Was there a technical reason for excluding them as an option? > > Not in particular. We originally proposed private(set) because > that's what Swift uses. In the discussion people proposed several alternatives that I put into > the poll, but private_set wasn't one of them. Although several > people said they were opposed to parens in the keyword, Have you considered updating the RFC to use private_set, and not introduce new characters for keywords? As it wasn't in the poll, then sticking to the poll result with at least some people saying they are opposed to it seems not necessarily the correct choice. The ()'s look particularly funky to me with property promotion. cheers Dan Ack

« previous php.internals (#119235) next »