DIP10005: Dependency-Carrying Declarations is now available for community feedback

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 13 18:23:07 PST 2016


On 12/13/16 8:53 PM, Chris M. wrote:
> On Wednesday, 14 December 2016 at 01:39:01 UTC, Andrei Alexandrescu wrote:
>
>> I prefer the current form of the proposal:
>>
>> bool equal(R1, R2)
>> import (std.range)
>> if (isInputRange!R1 && isInputRange!R2)
>> { ... }
>>
>> The point has been brought up that the syntax import(std.range) is
>> also used for string imports. It is a drawback.
>>
>>
>> Andrei
>
> How about using "imports" instead of "import"? Simple enough change, and
> it still makes sense
>
> bool equal(R1, R2)
> imports (std.range)
> if (isInputRange!R1 && isInputRange!R2)
> { ... }

I fear that (a) a lot of folks will believe "imports" is a keyword; (b) 
another lot of folks will write "import" instead of "imports" and wonder 
why it doesn't work. -- Andrei



More information about the Digitalmars-d mailing list