private alias for module

Myron Alexander someone at somewhere.com
Tue Aug 14 08:51:10 PDT 2007


Chris Nicholson-Sauls wrote:
> I'm not sure what the reasoning is, and would just assume have private 
> aliases as well. But I can add another option.  Assuming you just want 
> std.string.* to have a shorter name, you could try a static+renaming 
> import.
> 
> static import str = std.string;
> // ...
> str.toString(50);
> 
> If its something else you're after... then I don't know.
> 
> -- Chris Nicholson-Sauls

Chris,

I do not want to rename the module, I want to use "str" instead of 
"toString". The alias is a natural solution but I do not want it 
imported into the caller name space.

Regards,

Myron.


More information about the Digitalmars-d-learn mailing list