<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 Jan 27, 2016, at 9:27 AM, Dave 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=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Fair enough. Can we get an explicit, well-designed version of this before we get rid of the implicit, poorly-designed version?</div></div></blockquote><div><br class=""></div><div>I’m certainly not opposed to someone exploring this, but I don’t think it should block removing the bad thing.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I can’t recall off the top my head where, but I <i class="">know</i> I’ve done something like this:</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">struct</span> FunctionApplicator &lt;T, U&gt; {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">var</span> args: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> function: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span> -&gt; <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">U</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">init</span>(args: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span>, function: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span> -&gt; <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">U</span>) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">args</span> = args</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; &nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">self</span>.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">function</span> = function</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span> apply() -&gt; <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">U</span> {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span><span style="" class=""> </span>function<span style="" class="">(</span>args<span style="" class="">)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">}</div></div><div class=""><br class=""></div><div class="">Without tuple splatting, you’d need a&nbsp;<span style="font-family: Menlo; font-size: 11px;" class="">FunctionApplicator1&lt;T,U&gt;</span>,&nbsp;<span style="font-family: Menlo; font-size: 11px;" class="">FunctionApplicator2&lt;T,U,V&gt;</span>,&nbsp;<span style="font-family: Menlo; font-size: 11px;" class="">FunctionApplicator3&lt;T,U,V,W&gt;</span>, etc. They can’t even have the same name because Swift doesn’t support overloading type names for types with a different number of generic parameters.</div></div></div></blockquote><div><br class=""></div><div>Perhaps I’m misunderstanding, but that is certainly not the case. &nbsp;Even without the feature in question you can definitely pass a tuple around as a single argument, e.g.:</div><div><br class=""></div><div>func f(a : Int, _ b : Int) {…}</div><div><br class=""></div><div>let x = FunctionApplicator((42, b: 19), f)</div><div><br class=""></div><div>This functionality won’t be affected by removal of this feature.</div><div><br class=""></div><div>-Chris</div></div></body></html>