On Fri, Aug 5, 2022 at 7:09 PM Larry Garfield <la...@garfieldtech.com> wrote:
> Ilija Tovilo and I are happy to present the first new RFC for PHP 8.3: > Asymmetric Visibility. > > https://wiki.php.net/rfc/asymmetric-visibility > > Details are in the RFC, but it's largely a copy of Swift's support for the > same. > > -- > Larry Garfield > la...@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > Just wanted to point out that I loved syntax proposals by Juliette and Mike. Any of them would be better. Making a better syntax for PHP would be better than consistency with Swift, IMO. But I'm also inclined to agree with Marco Pivetta that this change is a lot less exciting now that we have `readonly`. In extremely rare cases where I need to modify an attribute more than once, I just fallback to private + getter and the nice thing about it is that it creates a consistent mindset that if a property is being accessed via a getter, then the reader should be advised that the property may change depending on WHEN it's accessed. -- Marco Deleu