<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Although&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md" class="">SE-0021</a>&nbsp;has a good goal, I don't like the details due to the use of parenthesis:<div class="">I'd prefer to keep them limited to actual function calls.</div><div class="">But most of the time, it would be possible to avoid ambiguity and keep the simpler syntax; this would be eliminated with you proposal, so I'm against it &nbsp;(SE-0021 would only be needed in situations that can't be solved with the old form).</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">C1: Extend&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md" class="">SE-0021</a>&nbsp;by&nbsp;<b class="">adding</b>&nbsp;the underscore-in-parentheses syntax `<font face="Menlo" class=""><span class="" style="font-size: 11px;">foo(_)</span></font>` to refer to the zero-argument function #1.</blockquote>I don't think that's consistent with the other use cases of the underscore: Afair, it never means "nothing", but always "there is something, but ignore it"</div><div class=""><br class=""></div><div class="">Additionally, I think it would be nice to have a clean way to avoid all ambiguities when referring to a function be specifying all involved types, so unless I didn't miss any downsides of using square brackets, my favorite would look like</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><font face="Menlo" class=""><span class="" style="font-size: 11px;">&nbsp; &nbsp;&nbsp;<b class="">func</b>&nbsp;foo() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><font color="#919191" class="" style="font-size: 11px;">// #1&nbsp;</font></font><font color="#919191" face="Menlo" class="" style="font-size: 11px;">Function named&nbsp;'<b class="">foo(_)</b>' with type '<b class="">() -&gt; ()</b>'.</font></div></blockquote><div class="">let f = foo</div><br class=""><blockquote type="cite" class=""><div class=""><font face="Menlo" class=""><span class="" style="font-size: 11px;">&nbsp; &nbsp;&nbsp;<b class="">func</b>&nbsp;foo(x: Int) -&gt; Int &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><font color="#919191" class="" style="font-size: 11px;">// #2&nbsp;</font></font><font color="#919191" face="Menlo" class="" style="font-size: 11px;">Function named&nbsp;'<b class="">foo(x:)</b>' with type '<b class="">Int -&gt; Int</b>' (not an overload).</font></div></blockquote><div class="">let f = foo[x: Int]</div><br class=""><blockquote type="cite" class=""><div class=""><font face="Menlo" class=""><span class="" style="font-size: 11px;">&nbsp; &nbsp;&nbsp;<b class="">func</b>&nbsp;foo(_ x: Int) -&gt; Int &nbsp; &nbsp; &nbsp; &nbsp;</span><font color="#919191" class="" style="font-size: 11px;">// #3&nbsp;</font></font><font color="#919191" face="Menlo" class="" style="font-size: 11px;">Function named&nbsp;'<b class="">foo(_:)</b>' with type '<b class="">Int -&gt; Int</b>'</font></div></blockquote><div class="">let f = foo[Int]</div><br class=""><blockquote type="cite" class=""><div class=""><font face="Menlo" class=""><span class="" style="font-size: 11px;">&nbsp; &nbsp;&nbsp;<b class="">func</b>&nbsp;foo(_ x: (Int, Int)) -&gt; Int&nbsp;</span><font color="#919191" class="" style="font-size: 11px;">// #4 Function named '<b class="">foo(_:)</b>' with type '<b class="">(Int, Int) -&gt; Int</b>' (overload of #3).</font></font></div></blockquote><div class="">let f = foo[(Int, Int)]</div><br class=""><blockquote type="cite" class=""><div class=""><span class="" style="font-family: Menlo; font-size: 11px;">&nbsp; &nbsp;&nbsp;<b class="">func</b>&nbsp;foo(x: Int, y: Int) -&gt; Int &nbsp;</span><font color="#919191" class="" style="font-family: Menlo; font-size: 11px;">// #5 Function named '<b class="">foo(x:y:)</b>' with type '<b class="">(Int, Int) -&gt; Int</b>'.</font></div></blockquote><div class="">let f = foo[x: Int, y: Int]</div><br class=""><blockquote type="cite" class=""><div class=""><span class="" style="font-family: Menlo; font-size: 11px;">&nbsp; &nbsp;&nbsp;<b class="">func</b>&nbsp;foo(x: Int, y: Int) -&gt; Bool&nbsp;</span><font color="#919191" class="" style="font-family: Menlo; font-size: 11px;">// #6 Function named '<b class="">foo(x:y:)</b>' with type '<b class="">(Int, Int) -&gt; Bool</b>' (overload of #5).</font></div></blockquote>let f = foo[x: Int, y: Int]</div><div class=""><br class=""></div><div class="">Ideally, it should be possible to specify the return type as well… but there are so many syntax options for this, and I don't see a natural choice...</div><div class=""><div class="">let f = foo:Bool[x: Int, y: Int]</div></div><div class=""><div class="">let f = foo-&gt;Bool[x: Int, y: Int]</div></div><div class=""><div class="">let f = foo[x: Int, y: Int; Bool]</div></div><div class=""><div class="">let f = foo[x: Int, y: Int]-&gt;Bool</div></div><div class=""><br class=""></div><div class="">Tino</div></body></html>