Multiple return values

Manu turkeyman at gmail.com
Tue Jan 3 14:40:13 PST 2012


Why doesn't D support multiple return values like many other modern
languages?

Clearly the same syntax as Go wouldn't work, but I'm sure a neat and tidy
syntax could be invented?
I constantly want to be able to return x,y from a function, or
retVal,errorCode and I want the language to make some rough ABI guarantees,
like multiple return values will be returned in consecutive registers,
rather than a single return value register like C/C++, avoiding the need to
pass output addresses through ref function parameters (slow!).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120104/32a6597e/attachment.html>


More information about the Digitalmars-d mailing list