And those rules aren't really type aware... as far as I can tell it wont split the int/float/etc args into separate register types...<div>Multiple return values via tuples are not really addressing the problem, and miss the point.<br>
<br><div class="gmail_quote">On 4 January 2012 01:13, Sean Kelly <span dir="ltr"><<a href="mailto:sean@invisibleduck.org">sean@invisibleduck.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF"><div>Tuple is a struct, so it's returned according to those rules. <br><br>Sent from my iPhone</div><div><div class="h5"><div><br>On Jan 3, 2012, at 3:09 PM, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br>
<br></div><div></div><blockquote type="cite"><div>Does returning a tuple give any ABI guarantees? How can I be sure multiple return values will return in consecutive registers?<div>What if the return types are of different types, a float and an int... can I expect each to return in their own register types respectively?</div>

<div>This needs to be defined and loosely guaranteed (within reason) so people can expect multiple return values to behave as expected on any architecture.<br><br><div class="gmail_quote">On 4 January 2012 01:02, Sean Kelly <span dir="ltr"><<a href="mailto:sean@invisibleduck.org" target="_blank">sean@invisibleduck.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's easy enough with Tuple, though better language support would be nice.<br>
<br>
Sent from my iPhone<br>
<div><div><br>
On Jan 3, 2012, at 2:40 PM, Manu <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote:<br>
<br>
> Why doesn't D support multiple return values like many other modern languages?<br>
><br>
> Clearly the same syntax as Go wouldn't work, but I'm sure a neat and tidy syntax could be invented?<br>
> 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!).<br>


</div></div></blockquote></div><br></div>
</div></blockquote></div></div></div></blockquote></div><br></div>