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, the two options that had parens (`private(set)` and `pubilc(set: private)`) were the leaders for all rounds. I was quite surprised at that, personally; I expected `private:set` to do a lot better under the circumstances. But that's not how the poll played out. --Larry Garfield -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php