<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 14 Feb 2017, at 20:43, Anton Zhilin via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important" class="">2017-02-14 18:32 GMT+03:00 Dimitri Racordon via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;:</p><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><div class="markdown-here-exclude"><div class=""><br class="webkit-block-placeholder"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="word-wrap:break-word" class="">
The proposal is indeed really interesting.
<div class="">I would love to see if it could get a second round of discussion.<br class="">
<div class=""><br class="">
</div>
<div class="">However, I failed to understand the syntax of the proposed extension. Where would be defined the label and parameter names? Is this just a typo?</div>
<div class=""><br class="">
</div>
<div class="">
<pre style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:16px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-radius:3px;color:rgb(51,51,51)" class=""><code style="box-sizing:border-box;font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;padding:0px;margin:0px;background-color:transparent;border-radius:3px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;word-wrap:normal" class="">func someFunc&lt;I:IteratorProtocol where I.Element == Int)</code></pre></div></div></div></blockquote><div class=""><br class="webkit-block-placeholder"></div></div><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><p style="margin:0px 0px 1.2em!important" class="">“Obviously”, the <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" class="">Collection</code> variant should look like:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class=""><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;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" class="">func someFunc&lt;C: Collection where C.Iterator.Element == Int&gt;(_ values: @variadic C) { … }
</code></pre><p style="margin:0px 0px 1.2em!important" class="">And the others are analagous.</p></div></div></div></blockquote></div><div>Thanks for the correction, not entirely sure how that mistake made it into the proposal!</div><div><br class=""></div><div>I didn't get an especially positive response to the proposal at the time, but it is still very much my preferred solution.</div><div><br class=""></div><div><br class=""></div><div>"Splatting" as the OP suggests is a simpler solution, but leaves variadics limited to a unique syntax with no control over type; I'm also not keen on re-using ellipsis as an operator for it, since it's also used for handling ranges, though that's not a major overlap. But still, part of why I made my proposal is that splatting feels more like a workaround to a problem of there not being a proper array/sequence/etc. signature for the function.</div><div><br class=""></div><div>I could of course be biased, but then I've never really supported variadics as a feature in the first place 😏</div></body></html>