<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"><br></div> <br> <div id="bloop_sign_1497305107136064000" 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> <br><p class="airmail_on">On 12 juin 2017 at 23:56:37, Xiaodi Wu (<a href="mailto:xiaodi.wu@gmail.com">xiaodi.wu@gmail.com</a>) wrote:</p> <div><blockquote type="cite" class="clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span><div><div></div><div><div dir="ltr">On Mon, Jun 12, 2017 at 4:47 PM, Jérémie Girault<span class="Apple-converted-space"> </span><span dir="ltr">&lt;<a href="mailto:jeremie.girault@gmail.com" target="_blank">jeremie.girault@gmail.com</a>&gt;</span><span class="Apple-converted-space"> </span>wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">- Void as arguments is pretty common when using generics, that’s a core point of this proposal. An maybe that’s why we misunderstood ourselves (around 0110 / 0066). This proposal addresses arguments.</div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">- maybe it should be revised around this ? Simple example : </div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">`typealias Callback&lt;T&gt; = (T) -&gt; Void` -&gt; `Callback&lt;Void&gt;` will give `(Void) =&gt; Void`. </div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"><br></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">It was acceptable before swift4 but no more. However nobody cares about this `Void` argument and actually we know it’s value. So why let the developer type it ?</div></div></blockquote><div><br></div><div>Ah, I see. The purpose of SE-0029...SE-0110 was to make it possible to distinguish an argument list `(Void)` from an argument list `()`. This does cause some verbosity where previously users relied on implicit tuple splatting. Ideally, we would bring back some syntactic sugar to make this more ergonomic. But, whether or not the spelling is made more user-friendly, the point here is that _everybody_ should care about this `Void` argument.</div></div></div></div></div></div></span></blockquote></div><p>It is still be typechecked and appropriate errors should be reported to the user so _nobody_ will ignore it.</p><p>But with the proposal the code will be striped out of Void arguments at compile-time. I think it&#39;s a win for the developer on a lot of grounds. The fact that this proposal integrates with the type-system is also important.</p><p>If you are not comfortable about Void being stripped, we can also discuss alternatives: someone was suggesting me that it would be possible to replace :</p><p>```</p><p>func foo&lt;T, U, V&gt;(t: T, u: U) -&gt; V {</p><p>  // do something with t and u</p><p>  // return some V</p><p>}</p><p>```</p><p>with</p><p>```</p><p>func foo&lt;Void, Int, String&gt;(u: Int) -&gt; String { let t = ()</p><p>  // do something with t and u</p><p>  // return some V</p><p>}</p><p>```</p><p>or</p><p>```</p><p>func foo&lt;Void, Int, String&gt;(t: Void = (), u: Int) -&gt; String {</p><p>  // do something with t and u</p><p>  // return some V</p><p>}</p><p>```</p><p>I don’t know what you would consider more effective or elegant (at an implementation level) but it’s the same result for the developper.</p><p><br></p><div><blockquote type="cite" class="clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span><div><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br class="Apple-interchange-newline"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px"></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgb(0,0,0);margin:0px">My point here is that `Void` should be “striped” by “reducing” argument list signatures.</div><span class=""><br></span><div id="m_-3578613130368345921bloop_sign_1497302247432667904" class="m_-3578613130368345921bloop_sign"><div style="font-family:helvetica,arial;font-size:13px"><span class="">—</span></div><div><span class=""><font face="Helvetica" size="1">very short reply expected -<span class="Apple-converted-space"> </span><a href="http://vsre.info" target="_blank">vsre.info</a></font></span></div><div style="font-family:helvetica,arial;font-size:13px"><span class="">Jérémie Girault<br></span></div></div><span class=""><br></span><p class="m_-3578613130368345921airmail_on"><span class="">On 12 juin 2017 at 19:15:18, John McCall (<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>) wrote:</span></p><div><div class="h5"><blockquote type="cite" class="m_-3578613130368345921clean_bq"><div style="word-wrap:break-word"><div><span><br></span><div><blockquote type="cite"><div><span>On Jun 12, 2017, at 4:48 AM, Jérémie Girault via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</span></div><span><br class="m_-3578613130368345921Apple-interchange-newline"></span><div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span>Hi here,</span></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span><br></span></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span>As I tested swift4 in xcode9b1 I noticed a lot of regressions about tuples usage.</span></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span><br></span></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span>After documenting myself about the changes which happened, I thought that they could be improved. Instead of fighting these propositions (which make sense), I wanted create a few proposal which would improve these recent changes with a few simple rules.</span></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span><br></span></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span>My propositions are based on the recent decisions and in the continuation of SE-0110. The first one is about Void.</span></div><div id="m_-3578613130368345921bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><span>Void is historically defined as the type of the empty tuple. The reason of this is that arguments were initially considered as tuple.</span></div></div></blockquote><span><br></span></div><div><span>The dominant consideration here was always return types, not parameters.  I&#39;m not sure there was ever much point in writing Void in a parameter list, but whatever reasons there were surely vanished with SE-0066.</span></div><div><span><br></span></div><div><span>Note that &#39;void&#39; in C was originally exclusively a return type.  ANSI gave it a new purpose it with void*, but the meaning is totally unrelated.</span></div><div><span><br></span></div><div><span>John.</span></div></div></div></blockquote></div></div></div></blockquote></div><br></div></div></div></div></span></blockquote><br class="Apple-interchange-newline"></div></body></html>