import concerns (was Re: Historical language survey)

kris foo at bar.com
Sat Jul 8 20:35:06 PDT 2006


Kirk McDonald wrote:
> Derek Parnell wrote:
> 
>> On Sun, 09 Jul 2006 11:59:37 +1000, Kirk McDonald  
>> <kirklin.mcdonald at gmail.com> wrote:
>>
>>
>>> I posted this proposal earlier, but I like it so much I'll repeat 
>>> myself:
>>>
>>> import B with bar;
>>> bar(); // unambiguous
>>>
>>> The point is you can list multiple names from the module without  
>>> repeating the module name:
>>>
>>> import MyModule with foo, baz;
>>>
>>> And "with" is already a keyword.
>>
>>
>>
>> So what? But if you did want to reuse the "with" keyword why not use 
>> it in  the same manner...
>>
>>  with MyModule import foo, baz;
>>
>>
> 
> It makes the grammar simpler to start both with "import," I think. I 
> also think it reads better. Both work, though. I am not picky, and will 
> be happy no matter what actual keywords we get for this functionality, 
> so long as we get it.
> 

That is *very* clear syntax. Hope you don't mind that I used it in a 
follow-up post ...



More information about the Digitalmars-d mailing list