Hacker News new | ask | show | jobs
by tekacs 2923 days ago
> or using `return` as a variable without exiting

Also found in the Nim language (no affiliation/loyalty, just in case anyone is curious to see an existing use of this)

https://nim-lang.org/0.18.0/tut1.html#procedures-result-vari...

1 comments

Many languages have return variables (e.g. Matlab far predates Nim), but this is the first time I saw the name/keyword return itself be used.
The name is 'result' not 'return'.