Should alias expand visibility?

Tomek Sowiński just at ask.me
Tue Jul 27 11:30:42 PDT 2010


Pelle wrote:

> On 07/26/2010 12:23 AM, Tomek Sowiński wrote:
>> If foo is private but its public alias poo exists, should you be able to
>> use poo? (currently you can't)
>>
>>
>> Tomek
> 
> I think you should, because of this:
> 
> private import package;
> 
> alias package.function myFun;
> 
> If you want to provide a function from a package but not forward the
> visibility of the entire package.

Not exactly what I had in mind. function in package must be declared as 
public to be able to import it so the alias is not expanding its visibility. 
See other posts for relevant examples.


Tomek

p.s. (if you already knew, ignore it) package is a keyword, so is function, 
and in D you import modules (files) not packages (folders).


More information about the Digitalmars-d mailing list