Why can't we put import in functions.

Kyle Furlong kylefurlong at gmail.com
Tue Oct 16 02:35:17 PDT 2007


Don Clugston wrote:
> Bill Baxter wrote:
>> Yang Bo wrote:
>>> We can put "using namesapce" in any place in C++. Why not do the same
>>> way in D?
>> Yes it is lacking.  Definitely on my top ten features list for D.
>>
>> --bb
> It's particularly annoying that you can't use import in unittest{} blocks.

I see lots of code that looks like this:

// Dont pollute module with unittest only symbols
debug(UnitTesting) import testingdepedencies;

unittest
{
    ...
}



More information about the Digitalmars-d mailing list