Proposal for an extension to the import syntax

Bill Baxter dnewsgroup at billbaxter.com
Mon Dec 11 15:42:31 PST 2006


John Reimer wrote:
> On Mon, 11 Dec 2006 12:39:36 -0800, Chris Nicholson-Sauls 
> <ibisbasenji at gmail.com> wrote:

> Massive imports will happen.  It's only a matter of time as huge 
> projects start rolling out.  "all.d" has been a popular workaround.  
> But, once again, I think all.d is not optimal and only acts as a red 
> flag that reveals a future need.

I would also like to take this opportunity to point out that the current 
selective import does not obey protection attributes.  That is,  if you 
do a selective import like:

   private import std.stdio : writefln;

writefln will leak out to other modules that import this one, despite 
the 'private' attribute.

(and yes I know private is the default, just put it there for emphasis).

http://d.puremagic.com/issues/show_bug.cgi?id=604

I think this is another issue that will start to bite more people in the 
rump as project sizes grow.

--bb



More information about the Digitalmars-d mailing list