Re: [RFC] Asymmetric visibility

From: Date: Mon, 08 Aug 2022 13:23:38 +0000
Subject: Re: [RFC] Asymmetric visibility
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-118390@lists.php.net to get a copy of this message
On 08/08/2022 10:14, Marco Pivetta wrote:
As for readonly, the reason we sometimes **cannot** use readonly is because current clone semantics can't work around readonly rules (discussed in the readonly RFC):https://3v4l.org/og8bn If we solved that, I think private(set) would become even more situational, if not completely unnecessary.
I'm with Marco on this; the majority of use cases for asymetric properties could be resolved if internally cloned objects could update their readonly properties. And I also find the syntax looks odd, and not like any other aspects of PHP, not to mention the potential length of property definitions -- Mark Baker _________ |. \ \-3 |_J_/ PHP | || | __ | || |m| |m| I LOVE PHP

« previous php.internals (#118390) next »