Why can't we put import in functions.

Bruce Adams tortoise_74 at yeah.who.co.uk
Tue Oct 16 00:47:49 PDT 2007


Robert Fraser Wrote:

> Yang Bo Wrote:
> 
> > We can put "using namesapce" in any place in C++. Why not do the same
> > way in D?
> 
> mixin(import(FILENAME));
> 
> You may need a compile-time function to strip the module declaration and be wary of forward references.

Its practices like this that will result it someone writing D++ or E or
switching to something else entirely. Ugly ugly ugly. Do not promote.

Bruce.




More information about the Digitalmars-d mailing list