Re: Pass by Reference
- Posted by dcuny Jan 14, 2015
- 2041 views
Spock said...
Just my 2c. If the requirement for multiple return values were driven largely by returning error/status codes then the suggestion (of mine in the Try/Catch thread) of using an implicit error variable would reduce a lot of this need. Therefore, that seems to simplify the issue to mere desequencing.
Error flags aren't the primary driver.
But you're right in that it helps separate the error code from the return value.
That's only one example where it's nice to be able to return multiple values, instead of having to resort to globals.
Since Euphoria already supports this via the de-sequencing operator, we're mainly discussing (delicious) semantic sugar.
- David