> Le 19 juil. 2025 à 00:41, Rob Landers <rob@bottled.codes> a écrit :
> 
> The original author (Nikita) suggested that there's nothing in the original 
> design that precludes accessors -- and highlights languages where there are 
> both and they are doing just fine more than 5 years later.

Hi Rob,

It is indeed entirely reasonable to have both readonly properties and hooked 
properties (aka accessors), and today PHP has indeed both of them (and even 
asymmetric visibility on top of that, as a separate feature contrarily to C#). 
But it doesn’t mean that it is reasonable for the *same* property to be *both* 
readonly and hooked, which is the point that is currently disputed. — What do 
the other languages allow? Is it possible to define a readonly property with a 
user-defined getter? (Disclaimer: Even if one of them allows such a thing, I’ll 
still think that it is a bad idea.)

—Claude 

Reply via email to