DIP16: Transparently substitute module with package

Chris NS ibisbasenji at gmail.com
Fri Mar 30 23:55:36 PDT 2012


On Saturday, 31 March 2012 at 06:39:07 UTC, Nick Sabalausky wrote:
> "Chris NS" <ibisbasenji at gmail.com> wrote in message
> news:ugopmohijjcnnrchuwbe at forum.dlang.org...
>> I'm pretty impressed with the idea, and look forward to its 
>> implementation, but I do have one question.  How does this 
>> affect (if at all) the implicit "friend" relationship of 
>> declarations?  Since package "foo.bar" is treated as a single 
>> module, do the classes in "foo/bar/alpha.d" and 
>> "foo/bar/beta.d" have access to each other's private members?
>>
>> I'm not sure whether I favor them losing or keeping their 
>> "friend" status.
>>
>
> There's always the "package" access specifier.

True, though it bears revisiting in its own right.  I've never 
been completely satisfied with the horizontal visibility, and 
would have preferred 'package' be defined as "visible within 
current package, *and subpackages* of the current."  But now I'm 
getting a bit off-topic.


More information about the Digitalmars-d mailing list