import concerns

Andrei Khropov andkhropov at
Sat Jul 8 03:18:28 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:
> or:
> 	alias 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.

That's what I was talking about in

Finally got a feedback from Walter :-)

Looking forward to see this in future releases.

"as" would be nice too but it's just syntactic sugar for fqn import + alias.


More information about the D.gnu mailing list