Hi
On 6/4/24 15:30, Larry Garfield wrote:
If enough people felt strongly that it should be allowed, I don't think there's any technical reason it couldn't be allowed, other than it would allow some rather silly combinations. (Ilija can tell me if I'm wrong.) However, also note that it is, of course, much easier to allow more combinations in the future than to remove them, should we find they cause trouble.
One thing that would get pretty wonky would be private-read properties: Private property names are currently internally "mangled" to include the class name. This allows to define the same private property in multiple classes of an inheritance chain, without those classes needing to know about the private properties of each other and making the addition and removal of a private property not a BC break. For all intents and purposes those private properties to not exist, unless you are the class itself.
I have no idea what the semantics of a public-write, private-read property should be - and this problem is pretty similar to the sibling-discussion about making private-set properties implicitly final, because otherwise the semantics get wonky.
I believe that the case of making a property public-write, private-read is best left to a virtual set-only hook.
Best regards
Tim Düsterhus