Import concerns revisited
kris
foo at bar.com
Sun Jul 9 10:55:54 PDT 2006
Dave wrote:
> kris wrote:
>> You've seen the requested syntax for this option, Walter. Let's
>> revisit it again:
>>
>> # with m2 import func, abcd, efgh;
>>
>>
>
> That doesn't address the aliasing if I'm understanding correctly (what
> if m3 is imported and has an 'abcd' and 'efgh' also)?
The proposed syntax for that has been noted as the following:
# with m3 import func, abcd as myabcd, efgh as myefgh;
or
# from m3 import func, abcd as myabcd, efgh as myefgh;
This align well with the non-selective import:
# import lib.text.locale as locale;
> Also, I don't like the 'with' because it breaks the continuity of a page
> scan (for me at least). May seem silly, but I'm expecting to see lines
> starting with 'import' or 'private import' when I check out what people
> are importing.
Yes, I agree. But feel the from/with syntax is quite suitable compared
to the having a slew of alias decls polluting the import space.
More information about the Digitalmars-d
mailing list