3 ms·
Multiple return values are a lot less general and harder to use than tuple values; you can't store them in maps or pass them over channels or compose functions
by erik_seaberg 7y ago
Multiple return values are a lot less general and harder to use than tuple values; you can't store them in maps or pass them over channels or compose functions (while f(g()) works, f(g(), h()) is not allowed).
- masklinn 7y agoYou could implement an entire corner of the language to work with special-cased / non-reified MRV, that's what Common Lisp does. Go doesn't do that though. There is some magic for builtins (e.g. variable-arity MRV) but as usual mere mortals need not apply.