<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=""><br class=""><div>On Jan 6, 2016, at 7:21 PM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" class="">matthew@anandabits.com</a>&gt; wrote:<br class=""><blockquote type="cite" class=""></blockquote><font color="#5856d6" class=""><br class=""><br class=""></font><blockquote type="cite" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">On Jan 6, 2016, at 6:39 PM, Alex Johnson &lt;<a href="mailto:ajohnson@quickleft.com" class="">ajohnson@quickleft.com</a>&gt; wrote:<br class=""><blockquote type="cite" class=""></blockquote><font color="#00afcd" class=""><br class=""></font>Hi Matthew,<br class=""><font color="#00afcd" class=""><br class=""></font>Thanks for the explanation.<br class=""><font color="#00afcd" class=""><br class=""></font>Before getting into a deeper discussion, I'd like to try to enumerate the reasons for adding the placeholder as I understand them:<br class="">Does that seem accurate?<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">Add clarity by visually distinguishing memberwise initializers from normal initializers.<br class="">Introduce a "synthesized parameters placeholder" syntax that might be useful in other places.<br class="">Allow some control over where the synthesized memberwise parameters end up in the initializer signature.<br class=""></div></div></div></blockquote></div></div></blockquote><font color="#5856d6" class=""><br class=""></font>This is mostly correct (in terms of my motivation - Chris may have additional reasons). &nbsp;<br class=""><font color="#5856d6" class=""><br class=""></font>The point about clarity in regards to the `…` is about making it clear when looking at the signature that synthesized parameters are included in addition to those that are manually specified. &nbsp;This the most important point.<br class=""><font color="#5856d6" class=""><br class=""></font>The `memberwise` declaration modifier on the initializer itself is what distinguishes memberwise initializers from other initializers.<br class=""><font color="#5856d6" class=""><br class=""></font>Matthew<br class=""><font color="#5856d6" class=""><br class=""><br class=""></font><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font color="#00afcd" class=""><br class=""></font>~ Alex<br class=""><font color="#00afcd" class=""><br class=""><br class=""></font>On Wed, Jan 6, 2016 at 3:48 PM, Matthew Johnson <span dir="ltr" class="">&lt;<a href="mailto:matthew@anandabits.com" target="_blank" class="">matthew@anandabits.com</a>&gt;</span> wrote:<br class=""><font color="#00afcd" class=""><br class=""></font><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="gmail_extra"><div class="gmail_quote"><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class="">On Jan 6, 2016, at 5:26 PM, Alex Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><blockquote type="cite" class=""></blockquote><font color="#12c00e" class=""><br class=""></font>(this is mostly a repost of a message I sent to the "[draft]" thread for this proposal, with some light editing to better match terminology in the proposal)<br class=""><font color="#12c00e" class=""><br class=""></font><b class="">What is your evaluation of the proposal?</b><br class=""><font color="#12c00e" class=""><br class=""></font>I like this proposal. I think it will bring some much-needed ease-of-use.<br class=""><font color="#12c00e" class=""><br class=""></font>I have reservations about the "<font face="monospace, monospace" class="">...</font>" placeholder for the&nbsp;memberwise initialization parameters, though. I know this was suggested by Chris&nbsp;Lattner, so I'm inclined to defer to his judgement. But, here are my thoughts:<br class=""><font color="#12c00e" class=""><br class=""></font><div class=""><div dir="ltr" class=""><div class="">First, it's very close to the varags syntax (e.g. "<font face="monospace, monospace" class="">Int...</font>") which can also appear in initializer&nbsp;parameter&nbsp;lists.</div></div></div><font color="#12c00e" class=""><br class=""></font>Second, and I think more important, I'm not sure that it's all that <i class="">useful</i>. It's presence isn't necessary for triggering memberwise initialization synthesis; that is already done by the "memberwise" keyword.<br class=""><font color="#12c00e" class=""><br class=""></font>The primary example given in the proposal is:<br class=""><font color="#12c00e" class=""><br class=""></font><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><font face="monospace, monospace" class="">memberwise init(anInt: Int, anotherInt: Int, ...) {</font></div><div class=""><font face="monospace, monospace" class="">&nbsp; /* code using anInt and anotherInt */</font></div><div class=""><font face="monospace, monospace" class="">}</font></div></div></div></blockquote><font color="#12c00e" class=""><br class=""></font>That is, it's used to indicate where the synthesized parameters appear in the parameter list if there are also custom (non-memberwise)&nbsp;parameters.<br class=""><font color="#12c00e" class=""><br class=""></font>My question is, <b class="">could the memberwise initialization parameters always be last?</b> That would eliminate the need for the placeholder.<br class=""><font color="#12c00e" class=""><br class=""></font>I don't think I've seen a compelling case for embedding the "<font face="monospace, monospace" class="">...</font>" <i class="">within</i> a list of custom arguments, like:<br class=""><font color="#12c00e" class=""><br class=""></font><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><span style="font-family: monospace, monospace;" class="">memberwise init(anInt: Int, ...,&nbsp;anotherInt: Int) {</span><br class=""><span style="font-family: monospace, monospace;" class="">&nbsp; /*&nbsp;code using anInt and anotherInt&nbsp;*/</span><br class=""><div class=""><font face="monospace, monospace" class="">}</font></div></div></div></blockquote><font color="#12c00e" class=""><br class=""></font><div class=""><div dir="ltr" class=""><div class="">It's been mentioned several times in the discussion of this proposal that this behavior is purely optional. If it turns out that there are rare cases where placing the memberwise params in the middle is useful, authors can use manual initialization.</div></div></div></span></div></div></blockquote><br class="">Hi Alex, thanks for your review. &nbsp;<br class=""><br class="">The initial draft of the proposal did exactly what you suggest - it did not include the placeholder and always placed the memberwise parameters last.&nbsp; Personally, I believe the placeholder adds clarity and really liked the idea when Chris suggested it. &nbsp;<br class=""><br class="">Aside from personal preference, I like that this proposal introduces a “synthesized parameter placeholder” syntax.&nbsp; Similar syntax will also be used in the parameter forwarding proposal mentioned in the future enhancements section of this proposal.<br class=""><br class="">I think the `…` works really well.&nbsp; That said, I don’t mind if people wish to bikeshed on it.&nbsp; If that discussion starts it is worth noting that one thing I like about the `…` is that it combines with an identifier cleanly.&nbsp; For example : `…memberwise`. &nbsp;<br class=""><br class="">Combining the placeholder with an identifier allows more than one placeholder to be used in the same parameter list.&nbsp; For example, if you are forwarding memberwise parameters exposed by a super init you might also have `…super`. &nbsp;<br class=""><br class="">That said, I don’t want the review thread to get distracted with discussions around general parameter forwarding so please just consider this as a preview of how this syntax might scale to future applications.&nbsp; For now, lets keep this thread focused on the review of the current proposal. &nbsp;:)<br class=""><br class="">Matthew<br class=""><br class=""><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><font color="#12c00e" class=""><br class=""><br class=""></font>On Wed, Jan 6, 2016 at 2:47 PM, Chris Lattner via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><font color="#12c00e" class=""><br class=""><br class=""></font><blockquote type="cite" class=""><div class=""><div class=""><div class="h5"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>Hello Swift community,<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>The review of "Flexible Memberwise Initialization" begins now and runs through January 10th. The proposal is available here:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0018-flexible-memberwise-initialization.md" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0018-flexible-memberwise-initialization.md</a><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>or, if you would like to keep your feedback private, directly to the review manager.<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>What goes into a review?<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp; * What is your evaluation of the proposal?<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp; * Is the problem being addressed significant enough to warrant a change to Swift?<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp; * Does this proposal fit well with the feel and direction of Swift?<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp; * If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp; * How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>More information about the Swift evolution process is available at<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/process.md" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>Thank you,<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>-Chris<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>Review Manager<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>_______________________________________________<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote>swift-evolution mailing list<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</div></div></div></div></div></blockquote><font color="#12c00e" class=""><br class=""></font>--&nbsp;<br class=""><font color="#12c00e" class=""><br class=""></font><b class="" style="font-size: small;"><span style="color:rgb(53,217,144)" class=""><font face="arial, helvetica, sans-serif" class="">Alex Johnson</font></span><font color="#666666" class="">&nbsp;| Engineering Lead</font></b><br class=""><font color="#666666" size="2" class=""><b class=""><br class=""></b></font><b class="" style="color: rgb(34, 34, 34); 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" class=""><font class="">Quick Left, Inc.</font></a></b><br class=""><span class="" style="color: rgb(34, 34, 34); font-family: Arial; white-space: pre-wrap; line-height: 1.15; font-size: small;"><b class="">Boulder </b></span><span class="" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 12.8000001907349px;"><font color="#999999" class=""><b class="">|</b></font></span><b class="" style="color: rgb(34, 34, 34); font-family: Arial; font-size: small; line-height: 1.15; white-space: pre-wrap;">&nbsp;</b><b class="" style="color: rgb(34, 34, 34); font-family: Arial; font-size: small; line-height: 1.15; white-space: pre-wrap;">Denver</b><font color="#999999" class="" style="font-family: arial, sans-serif; font-size: 12.8000001907349px;"><b style="font-family: Arial; font-size: small; line-height: 1.15; white-space: pre-wrap;" class="">&nbsp;</b><span style="font-size:12.8000001907349px" class=""><b class="">|</b></span></font><b class="" style="color: rgb(34, 34, 34); font-family: Arial; font-size: small; line-height: 1.15; white-space: pre-wrap;"> </b><b class="" style="color: rgb(34, 34, 34); font-family: Arial; font-size: small; line-height: 1.15; white-space: pre-wrap;">Portland</b><font color="#999999" class="" style="font-family: arial, sans-serif; font-size: 12.8000001907349px;"><b class=""><span style="font-family: Arial; font-size: small; line-height: 1.15; white-space: pre-wrap;" class="">&nbsp;</span><span style="font-size:12.8000001907349px" class="">|</span></b></font><b class="" style="color: rgb(34, 34, 34); font-family: Arial; font-size: small; line-height: 1.15; white-space: pre-wrap;"> San Francisco</b><br class=""><span style="color: rgb(102, 102, 102); font-family: arial, sans-serif; font-size: 12.8000001907349px;" class="">1 (844) QL-NERDS</span><br class=""><span style="color: rgb(102, 102, 102); font-family: arial, sans-serif; font-size: 12.8000001907349px;" class="">@nonsensery</span><br class=""><font color="#222222" face="arial, sans-serif" size="2" class=""><br class=""></font><a href="https://github.com/quickleft" target="_blank" class="" style="font-family: Arial; white-space: pre-wrap; font-size: 12.8000001907349px; color: rgb(0, 51, 204);"><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; vertical-align: middle !important;" alt="" class=""></a><a href="https://www.facebook.com/quickleft" target="_blank" class="" style="font-family: Arial; white-space: pre-wrap; font-size: 12.8000001907349px; color: rgb(0, 51, 204);"><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; vertical-align: middle !important;" alt="" class=""></a><a href="https://twitter.com/quickleft" target="_blank" class="" style="font-family: Arial; white-space: pre-wrap; font-size: 12.8000001907349px; color: rgb(0, 51, 204);"><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; vertical-align: middle !important;" alt="" class=""></a><a href="https://instagram.com/quick_left/" target="_blank" class="" style="font-family: Arial; white-space: pre-wrap; font-size: 12.8000001907349px; color: rgb(0, 51, 204);"><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; vertical-align: middle !important;" alt="" class=""></a><a href="https://www.flickr.com/photos/quickleft" target="_blank" class="" style="font-family: Arial; white-space: pre-wrap; font-size: 12.8000001907349px; color: rgb(0, 51, 204);"><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; vertical-align: middle !important;" alt="" class=""></a><a href="https://vimeo.com/quickleft" target="_blank" class="" style="font-family: Arial; white-space: pre-wrap; font-size: 12.8000001907349px; color: rgb(0, 51, 204);"><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; vertical-align: middle !important;" alt="" class=""></a><br class=""><font color="#444444" face="Arial, Verdana, sans-serif" size="2" class=""><br class=""></font><span class="" style="white-space: pre-wrap; font-family: arial, sans-serif; font-size: 12.8000001907349px; color: rgb(53, 217, 144);"><font face="arial, helvetica, sans-serif" size="2" class=""><b class="">What's it like to work with us? </b></font></span><font class="" style="white-space: pre-wrap; color: rgb(68, 68, 68); font-size: 12.8000001907349px; font-family: Arial;"><i style="font-family: arial, sans-serif;" class="">TrainingPeaks, iTriage, and Ping Identity share their stories in this short video</i><i style="font-family: arial, sans-serif;" class=""><font color="#500050" class="">&nbsp;</font><a href="https://vimeo.com/92286352" style="color:rgb(0,51,204)" target="_blank" class=""><font color="#666666" class="">A Client's View</font></a></i><span style="font-family: arial, sans-serif;" class=""><font color="#666666" class="">.</font></span></font><br class=""><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=eLFMrKDT8iBxZ-2Fbnk-2BZqvSchNN-2FvYXdceA0T7VxwkAflhrD7tw43AEGnufwuVJZw8Do59-2F-2FMus3U1hozBsEznD0SIdxYuNyXu4pilODBtqc9r9pS88bGG8-2BFyuj9qUzvk-2B-2FnUkeCiwHtCs-2B-2FlvxcPyD-2Bl86UWfhXe7whnMzfLts1GFXozJHRBQMzSoI7TTnIE-2Fc8pfutJJrT4X2-2BFb-2FHazJJOd-2FPFwodPPyLZCt8Wec-3D" alt="" width="1" height="1" border="0" class="" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><div class=""><div class=""><div class="h5"><div class="gmail_extra"><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" style="color:rgb(68,68,68);font-family:Arial,Verdana,sans-serif;font-size:12.8000001907349px" class=""><div class=""><div style="line-height:1.15;font-size:12.8000001907349px;margin-top:0pt;margin-bottom:0pt" class=""><span style="font-family:Arial;vertical-align:baseline;white-space:pre-wrap;background-color:transparent" class=""><font size="2" class=""><a value="+13032425536" style="color:rgb(17,85,204);text-decoration:underline" class=""></a></font></span></div></div></div></div></div></div></div></div>
</div>
</div></div><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></span></div></div></div></blockquote></div>
</div></div></div></div>
</div></blockquote></div></div></blockquote></div><br class=""></body></html>