riff-lang / riff

The Riff programming language
https://riff.cx
BSD Zero Clause License
23 stars 1 forks source link

Multivalues/multiple return #25

Open darrylabbate opened 1 year ago

darrylabbate commented 1 year ago

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.