visibility vs. accessibility of protected symbols

Martin Nowak dawg at dawgfoto.de
Sun Feb 12 10:55:17 PST 2012


On Sun, 12 Feb 2012 19:32:28 +0100, David Nadlinger <see at klickverbot.at>  
wrote:

> On 2/12/12 7:28 PM, Martin Nowak wrote:
>> The shallow distinction of visibility vs. accessibility breaks the
>> module system because
>> one can't safely add a private symbol without possibly affecting every
>> dependent module.
>> Thus we're back at using underscore names to protect from that.
>
> Yes, and this is exactly why I argued to disregard invisible symbols  
> during overload resolution in the past. Walter seems to be firmly  
> convinced that the current solution is the right thing to do, but I  
> can't recall what his reasons were.
>
> David

Overloading is only the trickier part of it, but it affects all other  
symbols as well.
As far as overloading goes C++ does it one way and Java choses the other.
IMHO mixing protection levels for overloads could be disallowed.


More information about the Digitalmars-d mailing list