DIP16: Transparently substitute module with package

Rene Zwanenburg renezwanenburg at gmail.com
Fri Mar 30 12:26:03 PDT 2012


On Friday, 30 March 2012 at 18:39:44 UTC, Jonathan M Davis wrote:
> I'd propose that we make it so that if a module publicly 
> imports another
> module, then you could treat it as if it were in that module. 
> So, because
> std.datetime.package publicly imports std.datetime.systime, you 
> could use
> std.datetime.SysTime instead of std.datetime.systime.SysTime.

I'm not sure if that's a good idea. I'd prefer a new kind of 
import statement, perhaps something like:

// module std.datetime.package
alias import std.datetime.systime;

which is similar to a public alias of everything in that module?


More information about the Digitalmars-d mailing list