Steven Schveighoffer wrote:
On Tue, 04 Aug 2009 15:56:16 -0400, Ary Borenszweig <a...@esperanto.org.ar> 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.

Aaaaaaah... I see now. :)

Reply via email to