proposal: improved import declaration

eao197 eao197 at intervale.ru
Wed May 30 06:17:33 PDT 2007


On Wed, 30 May 2007 16:08:40 +0400, davidl <davidl at 126.com> wrote:

> wait till macro is available
>

I'm in doubt that this will be possible to do by a macro.

And I don't think it's a good idea to modify behaviour of 'import  
declaration' by a macro because it can make life too difficult to  
D-oriented build tools (like rebuild).

>> The proposal is to allow writing:
>>
>> import <module-root>.{<name>[,<name>...]};
>>
>> For example, instead of:
>>
>> import tango.io.Console;
>> import tango.io.Conduit;
>> import tango.io.FilePath;
>> import tango.io.FileSystem;
>> import tango.io.Stdout;
>>
>> simply write:
>>
>> import tango.io.{Console, Conduit, FilePath, FileSystem, Stdout};
>>



-- 
Regards,
Yauheni Akhotnikau



More information about the Digitalmars-d mailing list