4 ms·
> If you want to do multi-value return, the sane thing is to use a tuple, which is a core data structure we all learn about in CS undergrad, and use that as a r
by wahern 8y ago
> If you want to do multi-value return, the sane thing is to use a tuple, which is a core data structure we all learn about in CS undergrad, and use that as a return type and have functions return a single value
You could say the same about function argument lists--that functions should only take a tuple.
IME the reason some particular language only permits returning a single value is typically either (a) convention or (b) a reflection of implementation details.