DIP 88: Simple form of named parameters

Nick Treleaven via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 25 07:05:29 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

I agree Flag is a bit ugly to use, but IIUC this proposal does 
not enforce the use of a named argument, it's optional. Flag does 
call site name enforcement.

Also, named template arguments is an interesting idea, but they 
don't seem to be so useful as named function arguments. Boolean 
function arguments are pretty common, but I'm not sure templates 
have an equivalent compelling example. They could be left out at 
first perhaps.


More information about the Digitalmars-d mailing list