<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Although <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md" class="">SE-0021</a> 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 (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 <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md" class="">SE-0021</a> by <b class="">adding</b> 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;"> <b class="">func</b> foo() </span><font color="#919191" class="" style="font-size: 11px;">// #1 </font></font><font color="#919191" face="Menlo" class="" style="font-size: 11px;">Function named '<b class="">foo(_)</b>' with type '<b class="">() -> ()</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;"> <b class="">func</b> foo(x: Int) -> Int </span><font color="#919191" class="" style="font-size: 11px;">// #2 </font></font><font color="#919191" face="Menlo" class="" style="font-size: 11px;">Function named '<b class="">foo(x:)</b>' with type '<b class="">Int -> 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;"> <b class="">func</b> foo(_ x: Int) -> Int </span><font color="#919191" class="" style="font-size: 11px;">// #3 </font></font><font color="#919191" face="Menlo" class="" style="font-size: 11px;">Function named '<b class="">foo(_:)</b>' with type '<b class="">Int -> 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;"> <b class="">func</b> foo(_ x: (Int, Int)) -> Int </span><font color="#919191" class="" style="font-size: 11px;">// #4 Function named '<b class="">foo(_:)</b>' with type '<b class="">(Int, Int) -> 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;"> <b class="">func</b> foo(x: Int, y: Int) -> Int </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) -> 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;"> <b class="">func</b> foo(x: Int, y: Int) -> Bool </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) -> 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->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]->Bool</div></div><div class=""><br class=""></div><div class="">Tino</div></body></html>