<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I think it’s interesting to discuss tuples, especially around 1-sized tuples.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I also have an issue about 0-sized tuples and drafted a proposal here.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><a href="https://github.com/jeremiegirault/swift-evolution/blob/master/proposals/NNNN-flatten-void.md">https://github.com/jeremiegirault/swift-evolution/blob/master/proposals/NNNN-flatten-void.md</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">I think by addressing empty, 1 and n-sized tuples issues we can avoid the regressions of the language and greatly improve swift4</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div class="bloop_container"><div class="bloop_frame"> &gt; &gt; Le 9 juin 2017 à 10:07, Mark <a href="mailto:Laceymailto%3Amark.lacey@apple.com">Laceymailto:mark.lacey@apple.com</a>&#39;&gt;<a href="mailto:mark.lacey@apple.com">mailto:mark.lacey@apple.com</a>)&gt;a écrit :<br>&gt; &gt; <br>&gt; &gt; I’m not trying to argue that it’s impossible to do. I don’t think it’s a good idea at all. That’s subjective. Me saying “that really should be an error” is a subjective statement. I don’t have to say “This is a subjective statement” to make a subjective statement.<br>&gt; Yes, sorry: It&#39;s so easy to sound assertive even when we just want to share and communicate opinions.<br>&gt; <br>&gt; &gt; &gt; I *do* suggest a specific handling of { _ ... }. I have shown how it can be implemented in a non-ambiguous fashion.<br>&gt; &gt; <br>&gt; &gt; Your own comment says this should be considered ambiguous. It’s unambiguous now. What I am asking is how is that an improvement?<br>&gt; I suggest { _ in ... } is ambiguous only in case of function overloading. In this case, you have { (_) in ... } and { (_,_) in ... } for disambiguation:<br>&gt; <br>&gt; funcoverloaded(_closure: (Int,Int) -&gt;Int) -&gt;String{return&quot;overloaded 1&quot;}<br>&gt; funcoverloaded(_closure: ((lhs:Int, rhs:Int)) -&gt;Int) -&gt;String{return&quot;overloaded 2&quot;}<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; overloaded {_in1}// error: ambiguous use of ‘overloaded&#39;<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; overloaded { (_)in1}// &quot;overloaded 1”<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; overloaded { (_, _)in1}// &quot;overloaded 2”<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; When a function is not overloaded, then { _ in ... } would always mean &quot;I don&#39;t care&quot;, and is always accepted except for closures that take no argument at all:<br>&gt; <br>&gt; funcf1(_closure: () -&gt;Int) -&gt;String{return&quot;f1&quot;}<br>&gt; funcf2(_closure: (Int) -&gt;Int) -&gt;String{return&quot;f2&quot;}<br>&gt; funcf3(_closure: (Int,Int) -&gt;Int) -&gt;String{return&quot;f3&quot;}<br>&gt; funcf4(_closure: ((lhs:Int, rhs:Int)) -&gt;Int) -&gt;String{return&quot;f4&quot;}<br>&gt; <br>&gt; f1 {_in1}// error<br>&gt; <br>&gt; f2 {_in1}//OK, you don&#39;t care<br>&gt; <br>&gt; f3 {_in1}// OK, you don&#39;t care<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; f3 {(_,_)in1}// OK, just what I expected!<br>&gt; <br>&gt; f4 {_in1}// OK, you don&#39;t care<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; f4 {(_)in1}// OK,just what I expected!<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; f4 {(_,_)in1}// OK, maybe you use tuple splatting somewhere else and want to be consistent<br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; <br>&gt; All this is *possible*. And I don&#39;t see how it breaks anything. On the other side, it eases everyday life, reduces clutter, and avoids useless punctuation.<br>&gt; Gwendal<br>&gt; <br>&gt; <br>&gt; <br>&gt;  </div></div><br><div id="bloop_sign_1497180460648329984" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">—</div><div><font face="Helvetica" size="1">very short reply expected - <a href="http://vsre.info">vsre.info</a></font></div><div style="font-family:helvetica,arial;font-size:13px">Jérémie Girault<br></div></div></body></html>