import concerns
Andrei Khropov
andkhropov at nospam_mtu-net.ru
Sat Jul 8 03:24:42 PDT 2006
Andrei Khropov wrote:
> 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.
>
> 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 in future releases.
>
> "as" would be nice too but it's just syntactic sugar for fqn import + alias.
I'm sorry, this was an answer to the
http://www.digitalmars.com/d/archives/digitalmars/D/39784.html .
My damn news client posts it everywhere except the place place it's supposed to
be.
--
More information about the D.gnu
mailing list