riff icon indicating copy to clipboard operation
riff copied to clipboard

Multivalues/multiple return

Open darrylabbate opened this issue 2 years ago • 0 comments

E.g.

a,b = 1,2      // a = 1, b = 2
fn f() {
    return 1,2,3
}

x,y,z = f()    // x = 1, y = 2, z = 3

Note that this would technically be a "breaking" change with the way commas are currently parsed in expression statements.

darrylabbate avatar Nov 02 '22 06:11 darrylabbate