On Tue, 04 Aug 2009 15:56:16 -0400, Ary Borenszweig <[email protected]> wrote:

Andrei Alexandrescu wrote:
 Well some don't like to need to remember the order of arguments.

But that's a way totally different thing discussed here.

First you need to introduce argument names when invoking a function.

void foo(int timeout, string bar) {
    ..
}

Can be used as:

foo(timeout=5, bar="100")

(with some other syntax, of course)

Once you have that, you could do:

call!(foo)(timeout=5, bar="100")

VoilĂ !

It could also be accomplished via a fully implemented reflection library, which is my side topic for this thread branch :P

For instance you could do this exact thing in C#, even though C# doesn't support named parameters.

-Steve

Reply via email to