Support unpacking an array into function arguments similar to a tuple. I propose the same syntax of unpacking a tuple here, because Python uses the same syntax for unpacking tuples and lists as arguments (f(*tuple) and f(*list)).
var A = [1, 2, 3];
proc f(a, b, c) {
return a + b +c;
}
var sum = f(...A); // or some other syntax
This feature requires array size to be known at compile-time, i.e. arrays with param size, as a prerequisite.
Support unpacking an array into function arguments similar to a tuple. I propose the same syntax of unpacking a tuple here, because Python uses the same syntax for unpacking tuples and lists as arguments (
f(*tuple)
andf(*list)
).This feature requires array size to be known at compile-time, i.e. arrays with param size, as a prerequisite.