Pretty please: Named arguments
bearophile
bearophileHUGS at lycos.com
Mon Feb 28 10:56:27 PST 2011
spir:
> Yes, I'm aware of that. This usage in fact conflicts with the general
> "subtyping" semantics of ':'. But this conflict already exists with the usage
> of ':' in dyn array notation, which is linguistically pretty close to a named
> argument set; so...
If I have understood what you mean here, then I think we'll just have to leave with this small clash. An alternative solution is to use the Ada syntax: foo(x => 1, y=>2) but it's a bit longer because it requires two chars instead of one.
Bye,
bearophile
More information about the Digitalmars-d
mailing list