<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">2016-12-17 2:55 GMT+03:00 Vip Malixi via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;:</p>
<p style="margin:0px 0px 1.2em!important"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:HelveticaNeue-Light,&quot;Helvetica Neue Light&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,&quot;Lucida Grande&quot;,sans-serif"><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">var oneParameterAndMultipleReturn: ([Int]) -&gt; (even:[Int], odd:[Int]) = { numbers -&gt; ([Int], [Int]) in <br></div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">    var evenNumberArray = [Int]()</div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">    var oddNumberArray = [Int]()</div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr"><br></div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">    for number in numbers {</div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">        number % 2 == 0 ? evenNumberArray.append(number) : oddNumberArray.append(number)</div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">    }</div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr"><br></div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">    return (evenNumberArray, oddNumberArray)</div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">}<br></div></div></blockquote><p></p></div><p style="margin:0px 0px 1.2em!important"></p>
<p style="margin:0px 0px 1.2em!important">The above code is valid, because:</p>
<ol style="margin:1.2em 0px;padding-left:2em">
<li style="margin:0.5em 0px">Multi-return is just a type of tuple with labeled components.</li>
<li style="margin:0.5em 0px">Labeled tuples and normal tuples are implicitly convertible.</li>
</ol>
<p style="margin:0px 0px 1.2em!important">The only way we could make such code invalid is by removing labeled tuples altogether. -1 on that.<br>This problem mostly refers to code style, and the above variant can be more self-documenting in some cases.</p>
<p style="margin:0px 0px 1.2em!important"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:HelveticaNeue-Light,&quot;Helvetica Neue Light&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,&quot;Lucida Grande&quot;,sans-serif"><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr">Also, again for consistency and clarity, parameters in Closures should always be surrounded by parentheses, even single parameters:</div><div id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_2839" dir="ltr"><br></div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3467">var oneParameterAndMultipleReturn: ([Int]) -&gt; ([Int], [Int]) = { (numbers) -&gt; (even:[Int], odd:[Int]) in </div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3468">    var evenNumberArray = [Int]()</div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3469">    var oddNumberArray = [Int]()</div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3470"><br id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3471"></div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3472">    for number in numbers {</div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3473">        number % 2 == 0 ? evenNumberArray.append(number) : oddNumberArray.append(number)</div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3474">    }</div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3475"><br id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3476"></div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3477">    return (evenNumberArray, oddNumberArray)</div><div dir="ltr" id="m_-7360247118073459990yui_3_16_0_ym19_1_1481931868851_3478">}</div></div></div></blockquote><p></p></div><p style="margin:0px 0px 1.2em!important"></p>
<p style="margin:0px 0px 1.2em!important">This should be considered a bug. <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">numbers in</code> or <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">(numbers) in</code> or <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">(numbers) -&gt; (...) in</code>, but not <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">numbers -&gt; (...) in</code>, because the latter forms should be correct types.<br>Whether or not just <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">numbers in</code> should be allowed, is another talk.</p>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPjxkaXYg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