import concerns (was Re: Historical language survey)

Andrei Khropov andkhropov at nospam_mtu-net.ru
Sat Jul 8 02:58:32 PDT 2006


Walter Bright wrote:

> There's another way - have a different kind of import declaration, say,
> precede it with static:
> 
> 	static import foo;
> 
> which will make the symbols in foo available, but only if they are explicitly
> qualified. Then one could access bar in foo by either:
> 
> 	foo.bar();
> 
> or:
> 
> 	alias foo.bar bar;
> 	bar();
> 
> but not:
> 
> 	bar();	// error, undefined symbol
> 
> The advantage of this is it is a bit more flexible and more consistent with
> the way the rest of D lookups work.

Yes, that's what I was talking about in
http://www.digitalmars.com/d/archives/digitalmars/D/39348.html

Finally got a feedback from Walter :-).

Looking forward to see this implemented.

-- 
AKhropov



More information about the Digitalmars-d-learn mailing list