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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to