<div dir="ltr"><div>Thanks to all for comments!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">In regular functions parameters names are written near their usage. $0 are also all-known. So you don’t need to ‘guess’ parameter name.</span><br style="font-size:12.8px"><span style="font-size:12.8px">But if we will introduce some closure typealias in one file, and will use it in another - then we need somehow to know this parameter name.</span></blockquote><div>I think these argument names become part of API. When one meets some new API usually some time spent to get familiar with it. Same here.  </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">As an alternative solution, IDE hints can include these parameter names in closure autocomplete.</span></blockquote><div>Yes it could. However in this case the feature transforms to autocomplete hint. If so, I don&#39;t see any reason to change anything because it is possible to write these already.</div><div><br></div><div>Actually you suggestion revealed another issue for me. These default names could shadow names from outer scope. Result could be unexpected. </div><div> </div><div>let one = &quot;outer one&quot;</div><div><div style="font-size:12.8px">executeClosure {</div><div style="font-size:12.8px">        // here one is closure argument not a variable from closure scope</div><div style="font-size:12.8px"><span style="font-size:12.8px;white-space:pre-wrap">        </span><span style="font-size:12.8px">print(&quot;one \(one) two \(two)&quot;)</span><br></div><div style="font-size:12.8px">}</div></div><div><br></div><div>However this is a common problem. There was proposal about mandatory self because of it. I think compiler should warn about name shadowing.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:12.8px">I think you&#39;ll be able to accomplish this with SE-0021</span></blockquote><div><br></div><div>I don&#39; think so. That proposal describes a way to unambiguously make reference to overloaded function using its full name.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-14 0:16 GMT+03:00 Patrick Gili <span dir="ltr">&lt;<a href="mailto:gili.patrick.r@gili-labs.com" target="_blank">gili.patrick.r@gili-labs.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Eugene,<div><br></div><div>I think you&#39;ll be able to accomplish this with SE-0021 (<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md</a>), which has been accepted for Swift 2.2.</div><div><br></div><div>Cheers,</div><div>-Patrick</div><span class=""><div><br><div><blockquote type="cite"><div>On Feb 13, 2016, at 3:38 PM, Eugene Gubin via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">func executeClosure(closure: Closure) {</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="white-space:pre-wrap">        </span>// the caller uses external parameter names, nothing changed here </div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="white-space:pre-wrap">        </span>closure(first: &quot;first&quot;, second: 2)</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">}</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">executeClosure {</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="white-space:pre-wrap">        </span>// the callee uses custom arguments instead of $0, $1</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="white-space:pre-wrap">        </span>// also it is possible to override these names here as usual </div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="white-space:pre-wrap">        </span>print(&quot;one \(one) two \(two)&quot;)</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">}</div></div></blockquote></div><br></div></span></div></blockquote></div><br></div>