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

Adam D. Ruppe destructionator at gmail.com
Tue Feb 11 13:56:59 UTC 2020


On Tuesday, 11 February 2020 at 09:02:03 UTC, Timon Gehr wrote:
> What if fn is a template?

Then, as I'm sure you already know, it won't work. It needs an 
instantiation to wrap in this style. Same with Manu's code though 
so we've lost nothing.

Can be slightly annoying with stuff like `to!int`, you'd have to 
`wrap!(to!it)...`

A generic forwarder would be variadic and thus this DIP doesn't 
apply to it regardless. (Though, in a previous review on github 
for this I proposed a way to handle that - make a variadic 
template with named params form an anonymous struct that the 
receiving template can process. Similar to Python's kwargs I'm 
told. Got pushback and I decided to table it, even though it 
would provide a lot of cool flexibility so hoping we can come 
back to it later.)


More information about the Digitalmars-d mailing list