On Friday, 22 March 2013 at 09:18:33 UTC, J wrote:

The bigger point here is more profound: it is trivial to implement named parameters using structs + trivial lowerings, and this is no way conflicts with function overloading.

D deserves to have named parameters to functions -- it makes for much more legible code, and obviates the need for slow builder patterns. Readable and speedable. It's win-win.

Question for specialists of the topic : are parameter name available using compile time reflection ?

Because if they are, the problem boils down to perfect forwarding issue. And it seems solvable :

NamedCall!(
    function,
    "foo", fooVal,
    "bar", barVal); // Booya !

Reply via email to