"Nick Sabalausky" <[email protected]> wrote in message news:[email protected]... > "Peter Alexander" <[email protected]> wrote in message > news:[email protected]... >> I'm working on a fix to >> http://d.puremagic.com/issues/show_bug.cgi?id=6180 >> >> Essentially the problem boils down to: >> >> - Module A has a private symbol named x >> - Module B has a public symbol named x >> - Module C imports A and B and tries to use x unqualified >> >> Should the fact that B.x is public and A.x is private disambiguate the >> usage in module C to use B.x, or is that still an ambiguous unqualified >> usage of variable x that requires manual qualification/disambiguation? > > If something's private, it's supposed to be an "internal-only" sort of > thing. Private. Outside its own module, it shouldn't even be visibile and > it's existence shouldn't have any effect. So I'd say unqualfied use of x > inside C should definitely be allowed and resolve to B.x. >
I'd add that IMO, to do otherwise would break encapsulation (or at least put a big ugly dent in it).
