Hi

On 11/14/22 21:02, Claude Pache wrote:
To clarify my position:

* The set visibility must be either more restrictive or of the same restriction 
level than the get visibility.

* When the set visibility is absent, it is inferred as following:
      * If `readonly` is present, the set visibility is `private` (as of today);
      * otherwise, the set visibility is the same as the get visibility (again, 
as of today).

* We don’t judge whether it is reasonable to write `protected protected(set) 
string $foo;` when you could just write `protected string $foo` for the same 
effect. Similarly, we don’t judge whether it is reasonable to write `public 
function()` when you could just write `function()` for the same effect. We 
leave it to coding styles and linters to decide whether the short form or the 
long form is preferred.


I agree with that.

--------------

As I'm sending an email anyway: Larry, will there be a a new separate discussion thread, once all the problems are resolved and once it's clear what you propose? I just noticed the "Abbreviated Form" section in the RFC (https://wiki.php.net/rfc/asymmetric-visibility#abbreviated_form) which I disagree with, which apparently was added in October, but I remember an email letting readers know of the updated RFC. I didn't follow the evolution of the RFC too closely, though, because I believed that it still was in a somewhat early stage and because discussion is already split into way-to-many threads and also the poll.

Best regards
Tim Düsterhus

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

Reply via email to