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

Steven Schveighoffer schveiguy at gmail.com
Thu Feb 6 21:58:19 UTC 2020


On 2/6/20 4:46 PM, Lim wrote:
> On Thursday, 6 February 2020 at 21:37:11 UTC, Steven Schveighoffer wrote:
>> It could be worked out if one examines the whole expression/statement, 
>> but I think we're better off avoiding support for such things.
>>
>> Note that existing templates don't allow operators when omitting 
>> parentheses.
>>
> 
> Yep, that's what I mean. We should make it impossible or have a 
> predictable behavior. Unfortunately, this case was not mentioned in DIP 
> 1030.

I'm not sure it needs mentioning, as long as we are going to continue to 
enforce the current rules (no operators are included unless you use 
parentheses). Allowing colons as part of the no-parentheses template arg 
would be a difference that required a grammar change. As the DIP isn't 
changing that grammar (it's here: 
https://dlang.org/spec/grammar.html#TemplateSingleArgument), we 
shouldn't need to discuss it.

-Steve


More information about the Digitalmars-d mailing list