DIP 88: Simple form of named parameters

HaraldZealot via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 25 05:40:18 PST 2016


On Saturday, 23 January 2016 at 14:19:03 UTC, Jacob Carlborg 
wrote:
> This is mostly to prevent ugly hacks like Flag [1].
>
> http://wiki.dlang.org/DIP88
>
> [1] https://dlang.org/phobos/std_typecons.html#.Flag

Why not simply allow programmer to declare auto variable at 
function call side like in `foreach`?

E.g.

```d
void foo(int width, int height){...} //function definition

foo(width = 2, height = 3); // function call
```


More information about the Digitalmars-d mailing list