<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=""><div class="">Should the proposal include an exclusion list where the disambiguation still need to be resolved by an explicit type declaration. The first is currently hidden in the detailed design, so easy to miss as an exclusion. I compiled the following list based on the previous thread and my understanding of the proposal<div class=""><br class=""></div><div class="">Referencing to a parameter less function variant<br class=""><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span>&nbsp;foo() {&nbsp;<span style="color: rgb(61, 29, 129);" class="">print</span>(<span style="color: rgb(209, 47, 27);" class="">"foo"</span>) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span>&nbsp;foo(<span style="color: rgb(187, 44, 162);" class="">_</span>&nbsp;:<span style="color: rgb(112, 61, 170);" class="">Int</span>) {&nbsp;<span style="color: rgb(61, 29, 129);" class="">print</span>(<span style="color: rgb(209, 47, 27);" class="">"foo(_:)"</span>) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let</span>&nbsp;fn: () -&gt; () =&nbsp;<span style="color: rgb(49, 89, 93);" class="">foo</span></div></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal;" class="">Referencing to a&nbsp;function variant which differ only by return type<div class=""></div></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">func</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;foo(</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">_</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">:&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(112, 61, 170);" class="">Int</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">) -&gt;&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(112, 61, 170);" class="">Int</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;{&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(61, 29, 129);" class="">print</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">(</span></font><font color="#d12f1b" face="Menlo" class=""><span style="font-size: 11px;" class="">" foo -&gt; Int"</span></font><font face="Menlo" class=""><span style="font-size: 11px;" class="">);&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">return</span>&nbsp;<span style="font-family: Menlo; font-size: 11px; color: rgb(39, 42, 216);" class="">0</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;}</span></font></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">func</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;foo(</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">_</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">:&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(112, 61, 170);" class="">Int</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">) -&gt;&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(112, 61, 170);" class="">Bool</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;{&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(61, 29, 129);" class="">print</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">(</span></font><font color="#d12f1b" face="Menlo" class=""><span style="font-size: 11px;" class="">" foo -&gt; Bool"</span></font><font face="Menlo" class=""><span style="font-size: 11px;" class="">);&nbsp;</span></font><span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">return</span>&nbsp;<span style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);" class="">true</span><font face="Menlo" class=""><span style="font-size: 11px;" class="">&nbsp;}</span></font></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let</span>&nbsp;fn: (<span style="color: rgb(112, 61, 170);" class="">Int</span>) -&gt;&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>&nbsp;=&nbsp;<span style="color: rgb(49, 89, 93);" class="">foo</span></div></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">Referencing to a&nbsp;function variant which have same labels but different parameter types</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span>&nbsp;foo(<span style="color: rgb(187, 44, 162);" class="">_</span>:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>, value:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>) {&nbsp;<span style="color: rgb(61, 29, 129);" class="">print</span>(<span style="color: rgb(209, 47, 27);" class="">"foo Int"</span>) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span>&nbsp;foo(<span style="color: rgb(187, 44, 162);" class="">_</span>:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>, value:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Float</span>) {&nbsp;<span style="color: rgb(61, 29, 129);" class="">print</span>(<span style="color: rgb(209, 47, 27);" class="">"foo Float"</span>) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="color: rgb(187, 44, 162);" class="">let</span><span style="color: rgb(0, 0, 0);" class="">&nbsp;fn: (</span><span style="color: rgb(112, 61, 170);" class="">Int</span><span style="color: rgb(0, 0, 0);" class="">,&nbsp;</span><span style="color: rgb(112, 61, 170);" class="">Float</span><span style="color: rgb(0, 0, 0);" class="">) = foo&nbsp;</span>// Still ambiguous reference</div><div class=""><br class=""></div></div><div style="margin: 0px; line-height: normal;" class="">The proposal could also highlight that the following is no longer ambiguous.</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span>&nbsp;foo(<span style="color: rgb(187, 44, 162);" class="">_</span>:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>, Celsius:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>) {&nbsp;<span style="color: rgb(61, 29, 129);" class="">print</span>(<span style="color: rgb(209, 47, 27);" class="">"foo Celsius"</span>) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span>&nbsp;foo(<span style="color: rgb(187, 44, 162);" class="">_</span>:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>, Kelvin:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>) {&nbsp;<span style="color: rgb(61, 29, 129);" class="">print</span>(<span style="color: rgb(209, 47, 27);" class="">"foo Kelvin"</span>) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class=""><span style="color: rgb(187, 44, 162);" class="">let</span><span style="color: rgb(0, 0, 0);" class="">&nbsp;fn: (</span><span style="color: rgb(112, 61, 170);" class="">Int</span><span style="color: rgb(0, 0, 0);" class="">, Celsius:&nbsp;</span><span style="color: rgb(112, 61, 170);" class="">Int</span><span style="color: rgb(0, 0, 0);" class="">) = foo&nbsp;</span>// Still/was ambiguous reference</div><div class=""><div style="margin: 0px; line-height: normal; color: rgb(0, 132, 0);" class=""><span style="color: rgb(187, 44, 162);" class="">let</span><span style="color: rgb(0, 0, 0);" class="">&nbsp;fn: </span><span style="color: rgb(0, 0, 0);" class="">= foo(_:Celsius:)&nbsp;</span>// Fixed by the proposal</div></div><div class=""><br class=""></div><div class=""><div style="font-family: Helvetica; font-size: 12px; margin: 0px; line-height: normal;" class="">I started to write this note based on the second draft, so I was looking for default parameter example, and there seem to be an issue</div><div style="font-family: Helvetica; font-size: 12px; margin: 0px; line-height: normal;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; margin: 0px; line-height: normal;" class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span>&nbsp;foo(a:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>&nbsp;=&nbsp;<span style="color: rgb(39, 42, 216);" class="">1</span>, b:&nbsp;<span style="color: rgb(112, 61, 170);" class="">Int</span>&nbsp;=&nbsp;<span style="color: rgb(39, 42, 216);" class="">2</span>) {&nbsp;<span style="color: rgb(61, 29, 129);" class="">print</span>(<span style="color: rgb(209, 47, 27);" class="">"foo(</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>a<span style="color: rgb(209, 47, 27);" class="">),</span>\<span style="color: rgb(209, 47, 27);" class="">(</span>b<span style="color: rgb(209, 47, 27);" class="">))"</span>) }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">let</span>&nbsp;fn =&nbsp;<span style="color: rgb(49, 89, 93);" class="">foo</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="color: rgb(79, 129, 135);" class="">fn</span><span style="color: rgb(0, 0, 0);" class="">()&nbsp;</span>// error: missing argument for parameter #1 in call</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="color: rgb(79, 129, 135);" class="">fn</span><span style="color: rgb(0, 0, 0);" class="">(</span><span style="color: rgb(39, 42, 216);" class="">10</span><span style="color: rgb(0, 0, 0);" class="">)&nbsp;</span>// error: cannot convert value of type 'Int' to expected argument type '(Int, b: Int)'</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(79, 129, 135);" class="">fn</span>(<span style="color: rgb(39, 42, 216);" class="">10</span>,b:<span style="color: rgb(39, 42, 216);" class="">20</span>)</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="color: rgb(79, 129, 135);" class="">fn</span><span style="color: rgb(0, 0, 0);" class="">(b:</span><span style="color: rgb(39, 42, 216);" class="">20</span><span style="color: rgb(0, 0, 0);" class="">)&nbsp;</span>// error: missing argument for parameter #1 in call</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class="">// All the above work when using foo() instead of fn()</div><div class=""><br class=""></div><div class="">Dany</div></div><div style="font-family: Helvetica; font-size: 12px; margin: 0px; line-height: normal;" class=""></div></div><div class=""><br class=""></div></div></div></div></div><div class=""><div><blockquote type="cite" class=""><div class="">Le 13 janv. 2016 à 12:20, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 13, 2016, at 9:16 AM, Joe Groff 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=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello Swift community,<br class=""><br class="">The review of "Naming Functions with Argument Labels" begins now and runs through January 10th. The proposal is available here:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0018-flexible-memberwise-initialization.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md</a><br class=""><br class=""></div></div></blockquote><br class=""></div><div class="">Sorry, Mail mangled the link here, and the review runs through January <b class="">18th. </b>Here's the corrected link:</div><br class=""><div class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0021-generalized-naming.md</a></div><div class=""><br class=""></div><div class="">-Joe</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=TWMs2ohk0-2BcrwF6GNUK35QNQ48G65bEqXMjRx145i-2BI7Nc55EwZeMEFdJsICKIn4XzC4lupBUFtTI1XE4KE25h8qC37ZWPixK-2BWydKYwQzCh0rhMgpx9WPRw73oyhKq-2BuoIo7OMikuItKxJEac-2FiGRUhooIaHVLK7o-2BGQ2o-2BSiyhkMeRbYD3ofBAus8DCds145s2jhIYy72cbYi85hI8BNuxHrjHcb9UhQ423bHd5I8-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>