Multiple Return Values
Closed this issue · 3 comments
MoxyFoxy commented
Hello,
I was wondering if multiple return values has been considered for this language. It would, however, require a change in the calling convention.
ericlass commented
I thought about multiple return values a few times. I like the idea. I would probably go with the tuple approach, something like return (a, b);
, simlar to Rust. But that would be a feature for after the 1.0 version.
MoxyFoxy commented
How do you envision the syntax? For example, in Odin, it's:
x, y := foo();
Would you take a similar approach or something different?
ericlass commented
First thought was
(x, y) = foo();
Though, I kinda like it without brackets. I think I would go without.