<div dir="ltr">Hopefully this is still the right place to discuss this proposal (it&#39;s <a href="https://github.com/apple/swift-evolution/blob/master/schedule.md" target="_blank">listed as being in active review</a>, but I don&#39;t see a separate [Review] thread).<div><br></div><div>I like this proposal. I think it will bring some much-needed ease-of-use.</div><div><br></div><div>I&#39;m not sold on the &quot;...&quot; placeholder for the memberwise arguments, though. I know this was suggested by Chris Lattner, so I&#39;m tempted to defer to his judgement. But here are my thoughts:</div><div><br></div><div>First, it&#39;s very close to the varags syntax (e.g. &quot;Int...&quot;) which can also appear in initializer argument lists.</div><div><br></div><div>Second, and I think more important, I&#39;m not sure that it&#39;s all that <i>useful</i>. Aside from being used to mark the initializer as having &quot;memberwise&quot; semantics, which is already done by the &quot;memberwise&quot; keyword, the most common example I&#39;ve seen is code like this:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="monospace, monospace">memberwise init(customArg: Int, ...) {</font></div><div><font face="monospace, monospace">  /* use customArg */</font></div><div><font face="monospace, monospace">}</font></div></blockquote><div><br></div><div>That is, it&#39;s used to indicate where the synthesized arguments appear in the argument list if there are also custom (non-memberwise) arguments.</div><div><br></div><div>My question is, <b>why not always put the memberwise arguments last?</b> That would eliminate the need for the placeholder (aka &quot;...&quot;).</div><div><br></div><div>I don&#39;t think I&#39;ve seen a compelling case for embedding the &quot;...&quot; <i>within</i> a list of custom arguments, like:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><span style="font-family:monospace,monospace">memberwise init(customArg1: Int, ..., customArg2: Int) {</span></div><div><span style="font-family:monospace,monospace">  /* use customArg1 and customArg2 */</span></div><div><span style="font-family:monospace,monospace">}</span><br></div></blockquote></div><div><br></div><div>And it&#39;s been mentioned several times that this is purely additive. If there <i>is</i> an obscure case where that is useful, the author can write use manual initialization.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 6, 2016 at 6:48 AM, Thorsten Seitz via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, that makes sense.<br>
<br>
-Thorsten<br>
<div><div><br>
&gt; Am 03.01.2016 um 00:24 schrieb Chris Lattner &lt;<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>&gt;:<br>
&gt;<br>
&gt;<br>
&gt;&gt; On Jan 2, 2016, at 2:48 PM, Thorsten Seitz &lt;<a href="mailto:trsfoo@googlemail.com" target="_blank">trsfoo@googlemail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; One question just occurred to me: do we really need the keyword „memberwise“ anymore? Wouldn’t just using &quot;init(…)“ be sufficient?<br>
&gt;<br>
&gt; It wouldn’t be necessary to make the parser work, but I think we’d want something to make it clear what was intended.  Otherwise, you could write:<br>
&gt;<br>
&gt;    init(a : Int, …)<br>
&gt;<br>
&gt; when you meant:<br>
&gt;    init(a : Int …)<br>
&gt;<br>
&gt; and unfortunate things would happen.  The memberwise keyword also makes it much more clear to the reader what is going on.<br>
&gt;<br>
&gt; -Chris<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div><div dir="ltr" style="font-size:12.8000001907349px"><b style="font-size:small;background-color:transparent"><span style="color:rgb(53,217,144)"><font face="arial, helvetica, sans-serif">Alex Johnson</font></span><font color="#666666"> | Engineering Lead</font></b></div><div dir="ltr" style="font-size:12.8000001907349px"><b style="font-size:12.8000001907349px"><font color="#666666"><br></font></b></div><div dir="ltr" style="color:rgb(68,68,68);font-family:Arial,Verdana,sans-serif;font-size:12.8000001907349px"><div style="font-family:arial,sans-serif;color:rgb(34,34,34);font-size:12.8000001907349px"><b style="font-family:Arial;font-size:small;line-height:14.9499998092651px;white-space:pre-wrap"><a href="https://quickleft.com/" style="color:rgb(0,51,204)" target="_blank"><font color="#000000">Quick Left, Inc.</font></a></b></div><div style="font-family:arial,sans-serif;color:rgb(34,34,34);font-size:12.8000001907349px"><span style="color:rgb(0,0,0);font-family:Arial;white-space:pre-wrap;line-height:1.15;font-size:small;background-color:transparent"><b>Boulder </b></span><span style="font-size:12.8000001907349px"><font color="#999999"><b>|</b></font></span><b style="color:rgb(0,0,0);font-family:Arial;font-size:small;line-height:1.15;white-space:pre-wrap;background-color:transparent"> </b><b style="color:rgb(0,0,0);font-family:Arial;font-size:small;line-height:1.15;white-space:pre-wrap;background-color:transparent">Denver</b><font color="#999999" style="font-size:12.8000001907349px;background-color:transparent"><b style="font-family:Arial;font-size:small;line-height:1.15;white-space:pre-wrap;background-color:transparent"> </b><span style="font-size:12.8000001907349px"><b>|</b></span></font><b style="color:rgb(0,0,0);font-family:Arial;font-size:small;line-height:1.15;white-space:pre-wrap;background-color:transparent"> </b><b style="color:rgb(0,0,0);font-family:Arial;font-size:small;line-height:1.15;white-space:pre-wrap;background-color:transparent">Portland</b><font color="#999999" style="font-size:12.8000001907349px;background-color:transparent"><b><span style="font-family:Arial;font-size:small;line-height:1.15;white-space:pre-wrap;background-color:transparent"> </span><span style="font-size:12.8000001907349px">|</span></b></font><b style="color:rgb(0,0,0);font-family:Arial;font-size:small;line-height:1.15;white-space:pre-wrap;background-color:transparent"> San Francisco</b></div><div><font style="font-size:12.8000001907349px"><p style="line-height:1.15;font-size:12.8000001907349px;margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(102,102,102);font-family:arial,sans-serif;font-size:12.8000001907349px;line-height:normal;background-color:transparent">1 (844) QL-NERDS</span></p><p style="font-size:12.8000001907349px;margin-top:0pt;margin-bottom:0pt"><font color="#666666" face="arial, sans-serif">@nonsensery</font></p><p style="font-family:arial,sans-serif;color:rgb(34,34,34);margin:0px"><br></p></font><p dir="ltr" style="line-height:1.15;font-size:12.8000001907349px;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="https://github.com/quickleft" style="color:rgb(0,51,204)" target="_blank"><img src="http://i.imgbox.com/MNlkdRf3.png" style="border:0px;padding:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8000001907349px;line-height:normal;white-space:normal;vertical-align:middle!important" alt=""></a><a href="https://www.facebook.com/quickleft" style="color:rgb(0,51,204)" target="_blank"><img src="http://i.imgbox.com/mZ3v7rXp.png" style="border:0px;padding:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8000001907349px;line-height:normal;white-space:normal;vertical-align:middle!important" alt=""></a><a href="https://twitter.com/quickleft" style="color:rgb(0,51,204)" target="_blank"><img src="http://i.imgbox.com/C2qj69cx.png" style="border:0px;padding:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8000001907349px;line-height:normal;white-space:normal;vertical-align:middle!important" alt=""></a><a href="https://instagram.com/quick_left/" style="color:rgb(0,51,204)" target="_blank"><img src="http://i.imgbox.com/3kcv532Y.png" style="border:0px;padding:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8000001907349px;line-height:normal;white-space:normal;vertical-align:middle!important" alt=""></a><a href="https://www.flickr.com/photos/quickleft" style="color:rgb(0,51,204)" target="_blank"><img src="http://i.imgbox.com/qrtOZXDo.png" style="border:0px;padding:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8000001907349px;line-height:normal;white-space:normal;vertical-align:middle!important" alt=""></a><a href="https://vimeo.com/quickleft" style="color:rgb(0,51,204)" target="_blank"><img src="http://i.imgbox.com/lv7fDapY.png" style="border:0px;padding:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8000001907349px;line-height:normal;white-space:normal;vertical-align:middle!important" alt=""></a></span></p><p dir="ltr" style="line-height:1.15;font-size:12.8000001907349px;margin-top:0pt;margin-bottom:0pt"><br></p><p dir="ltr" style="line-height:1.15;font-size:12.8000001907349px;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><font size="2"><a value="+13032425536" style="color:rgb(17,85,204);text-decoration:underline"></a></font></span></p><div style="font-family:arial,sans-serif"><span style="vertical-align:baseline;white-space:pre-wrap"><span style="color:rgb(53,217,144)"><font face="arial, helvetica, sans-serif" size="2"><b>What&#39;s it like to work with us? </b></font></span><font style="font-size:12.8000001907349px;font-family:Arial"><i style="color:rgb(0,0,0);font-family:arial,sans-serif;white-space:normal">TrainingPeaks, iTriage, and Ping Identity share their stories in this short video</i><i style="font-family:arial,sans-serif;white-space:normal"><font color="#500050"> </font><a href="https://vimeo.com/92286352" style="color:rgb(0,51,204)" target="_blank"><font color="#666666">A Client&#39;s View</font></a></i><span style="font-family:arial,sans-serif;white-space:normal"><font color="#666666">.</font></span></font></span></div></div></div></div></div></div></div></div>
</div></div>