Hi

On 11/8/25 21:09, Rob Landers wrote:
Please remember to bottom post!

And please also remember to cut the quotes to the relevant part instead of just full quoting.

The reason I chose private(namespace) rather than a new keyword is that the 
semantics are fundamentally a widened form of private.

This is not accurate. As Alexandru also noted, it rather is an alternative to `protected`.

As I believe I had also noted for the nested classes RFC, `private` is special in that it does affect any other class at all. For all intents and purposes it is not visible to the outside and new private symbols can be introduced without taking care of possible parent or child classes.

From what I understand this is different for namespace-visibility as suggested in the RFC. Since the method is externally visible, changes to the signature affect both external callers and child classes, which need to maintain a compatible signature.

In fact it has a rather odd effect on child classes in a different namespace in that some methods are just unavailable to them. It is probably necessarily to restrict inheriting from classes with namespace-restricted symbols to classes from the same namespace (i.e. making the class itself namespace-final so to say).

Best regards
Tim Düsterhus

Reply via email to