Let’s have function
fn foo(x: i32, y: i32) -> i32 { x + y }
From the mathematical point of view, a function which takes two arguments is basically the same as a function which takes a two-tuple, because we can easily transform them either way without losing information.
fn foo2((x, y): (i32, i32)) -> i32 { x + y }
So what about allowing automatic destructuring here:
foo2(7, 15);
let x = (7, 15);
foo(x);
Is there any reason why Rust doesn’t support it other than nobody has implemented it?