Why can't we put import in functions.

James Dennett jdennett at acm.org
Mon Oct 15 21:12:48 PDT 2007


Yang Bo wrote:
> We can put "using namesapce" in any place in C++. Why not do the same
> way in D?

Not true for C++.  "using namespace" is invalid at class scope.
It works at namespace scope or block scope.  (It's a minor wart
on C++.  One of many.)

-- James



More information about the Digitalmars-d mailing list