Re: [Vala] Named arguments support



On Sat, Sep 1, 2012 at 6:46 PM, Ivo Kosir <ivokosir yahoo com> wrote:

Hi everyone,

When I make a simple method with default arguments, and try to put named
arguments like this:

void bar () {
    foo(c: 121);
}
void foo (int a = 5, int b = 5) {}

valac outputs me an error: "Named arguments are not supported yet",
does this mean it will be supported any time soon?


Hi,
no, it will not be supported any time soon as it's not trivial: named
arguments (arg=foo) will make argument names be part of the API.
While (arg: foo) is a shortcut for ("arg", foo).

Best regards,

-- 
www.debian.org - The Universal Operating System


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]