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

ArturG via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 15 15:46:30 PST 2016


On Thursday, 15 December 2016 at 19:52:50 UTC, Andrei 
Alexandrescu wrote:
> On 12/15/2016 02:22 PM, Timothee Cour via Digitalmars-d wrote:
>> Some more details on my proposa based on UDA:
>>
>> ...
>>
> I now understand the idea, thank you.
>
> My question is, doesn't this take things too far? Earlier I 
> wrote:
>
>> The acceptability of the proposal decays exponentially with its
>> deviation from existing import syntax.
>
> Indeed adding less syntax is better, but that's not an 
> absolute; the optimum isn't necessarily at the "zero syntax 
> added" point. This is because there are several things to 
> harmonize in language design, which naturally are in tension.
>
>
> Andrei

Something like Timothee Cour's @deps proposal is interesting,
because it adds the same options to DCD's as module level imports 
have.

They can be applied to any symbol that supports udas which the 
current syntax from the dip doesnt.

As he displayed, they can be used to group symbols together which 
makes it more dry, but that can also be a drawback when 
refactoring depending which version you use.

And you dont have to support all shown features as that syntax is 
easier extendable.

The initial version could support only import statements.


More information about the Digitalmars-d mailing list