<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><blockquote type="cite" class=""><div class="">On May 10, 2016, at 12:36 PM, Tony Allevato <<a href="mailto:allevato@google.com" class="">allevato@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, May 10, 2016 at 11:53 AM Chris Lattner via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Swift community,<br class="">
<br class="">
The review of "SE-0084: Allow trailing commas in parameter lists and tuples" begins now and runs through May 16. The proposal is available here:<br class="">
<br class="">
<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0084-trailing-commas.md" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0084-trailing-commas.md</a><br class="">
<br class=""> * What is your evaluation of the proposal?<br class=""></blockquote><div class=""><br class=""></div><div class="">-1. It makes more sense to allow this for arrays and dictionaries because are variable-length collections whose literals are much more likely to grow as a code base evolves (anecdotal personal experience). Tuples are fixed arity, so proactively protecting oneself with a trailing comma seems like it would have minimal benefit when the surrounding code would have to change in other ways.</div><div class=""><br class=""></div><div class="">Likewise for function calls; I would argue that if a function call/definition's parameter list is likely to grow so much and/or so frequently that a trailing comma provides significant savings, that's a code smell that should encourage the author to redesign the function.</div></div></div></div></blockquote><br class=""></div><div>FWIW, I personally agree with this observation.</div><div><br class=""></div><div>Parameter lists and tuples are also structurally different than collections. Parameter lists also have labels, and (depending on how the ‘disable reordering default arguments’ decision goes) parameters may not be added and reordered arbitrarily. Tuples are different because adding a member will often break all the code downstream because it changes the type of the value. This is different than array and dictionary literals.</div><div><br class=""></div><div>The only “collection like” aspect I can think of is for variadic parameter lists, but I don’t think they’re common enough to provide a special case for.</div><div><br class=""></div><div>-Chris</div><br class=""></body></html>