DIP 1030--Named Arguments--Community Review Round 1 Discussion

Timon Gehr timon.gehr at gmx.ch
Fri Feb 7 10:52:38 UTC 2020


On 07.02.20 06:00, Steven Schveighoffer wrote:
> Replying to Timon's post on the feedback thread:
> 
> On 2/6/20 10:49 PM, Timon Gehr wrote:
>  > This introduces syntax like:
>  >
>  > import std.typecons;
>  > alias t=AliasSeq!(c:1, a:2, b:3); // valid according to DIP
>  > void foo(int a,int b,int c){
>  >      writeln(a," ",b," ",c);
>  > }
>  >
>  > void main(){
>  >      foo(t);
>  > }
> 
> Does it? AliasSeq's template parameter (singular) is named TList, not a, 
> b, or c.
> 
> So I would expect this to fail to compile.

It does add the syntax, and I would argue it is not ideal if this fails 
to pass semantic analysis.


More information about the Digitalmars-d mailing list