<div class="gmail_quote">On 10 March 2012 02:10, Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch">timon.gehr@gmx.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 03/10/2012 01:00 AM, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 10 March 2012 01:17, Timon Gehr <<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a><br></div><div><div class="h5">
<mailto:<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>>> wrote:<br>
<br>
    On 03/10/2012 12:02 AM, Manfred Nowak wrote:<br>
<br>
        Manu wrote:<br>
<br>
            I'm just talking about the ABI for returning multiple<br>
            values, not<br>
            chaining<br>
<br>
<br>
        Does this mean, that you want a special type of "function"? For<br>
        example<br>
        this would be disallowed statement: `auto result= f( g(<br>
        parameters));',<br>
        if `f' and `g' are functions returning multiple values?<br>
<br>
<br>
    This needs to work. Multiple return values should integrate with the<br>
    existing language support for tuples.<br>
<br>
<br></div></div><div class="im">
What should that do exactly? A function that returns multiple values is<br>
passed as an argument to another function... what exactly is fed to<br>
which arguments of the outer function?<br>
</div></blockquote>
<br>
It would work like built-in tuples already do.<br>
<br>
(int, int) foo(int a, int b){return (a,b);}<br>
<br>
assert(foo(foo(foo(foo(1,2))))<u></u>==(1,2));<br>
<br>
(int, int) goo(int a, int b, int c){return (a+b, c);}<br>
<br>
assert(goo(foo(2,3),1) == (5,1));<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Describe how you see multiple return values working through tuples,<br>
while satisfying the issues I raise in my first couple of posts?<br>
</blockquote>
<br></div>
I have done so in my other post, you may refer to that one if something is still unclear: <a href="http://forum.dlang.org/post/jjdhdk$16v3$1@digitalmars.com" target="_blank">http://forum.dlang.org/post/<u></u>jjdhdk$16v3$1@digitalmars.com</a><br>

</blockquote></div><br><div>Right, that all looks good.</div><div>But I'm unclear of the language semantics, is this built-in a tuple actually a physical struct like phobos Tuple, or is it strictly a higher level concept?</div>
<div>I didn't realise such a thing as 'built-in tuple' existed, why does phobos Tuple exist?</div>