On 2/28/11, Steven Schveighoffer <[email protected]> wrote:
> This syntax already means something in D:
>
> string action;
> int times;
> foo(action = "dofoo", times = 100); // set action to "dofoo" and times to
> 100 and pass those to the function.
>
> -Steve
>
Except that doesn't do what you'd expect it to do:
void foo(ref int time) { }
void main()
{
int times;
foo(times = 100); // set times to 100 and pass to the function.
}
Error: function test.foo (ref int time) is not callable using argument
types (int)
Error: times = 100 is not an lvalue