Import proposals (Discuss)
John Reimer
John_member at pathlink.com
Sun Jul 9 19:01:31 PDT 2006
In article <e8s9fk$2e3f$1 at digitaldaemon.com>, Tom S says...
>
>Regan Heath wrote:
>> Something that has just occured to me WRT "Part-C" of my idea.. the
>> restriction of allowing only one module is probably un-necessary if we
>> assume a rule;
>>
>> * If a module is a single word i.e. "mylib" it comes at the start of an
>> import statement, eg.
>>
>> import mylib;
>>
>> or
>>
>> import mylib,my.other.lib.copyFile;
>>
>> etc.. and never after a "," eg.
>>
>> import my.other.lib.copyFile,mylib;
>>
>> (where "copyFile" is a symbol in "my.other.lib" and "mylib" is not)
>>
>> So, this allows multiple modules in the same import statement even
>> allowing you to import them into the same named scope, some examples:
>>
>> import my.other.lib.copyFile,deleteFile,your.lib.moveFile;
>>
>> imports "copyFile" and "deleteFile" from "my.other.lib" and "moveFile"
>> from "your.lib".
>>
>> import my.other.lib.copyFile,deleteFile,your.lib.moveFile as file;
>>
>> imports "copyFile" and "deleteFile" from "my.other.lib" and "moveFile"
>> from "your.lib" into named scope "file".
>>
>> Thoughts?
>
>Sorry, but I don't like it. I bet that every second coder new to the
>language would get totally confused by it.
>
>
I agree with, Tom. Too confusing.
More information about the Digitalmars-d
mailing list