Closed
Description
Proposed syntax:
fn foo(a: u8, b: usize, c: []const u8) void {}
test "optional argument names" {
foo(c: "Hi!", 0, 42); // -> foo(0, 42, "Hi!");
foo(a: 0, c: "bar", 10); // -> foo(0, 10, "bar");
}
Invalid argument names obviously cause a compile error.
To match the arguments, we simply look at the named arguments first, then match the rest in the same order they appear in the function definition.