<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 10, 2016 at 12:27 PM, Erica Sadun 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"><div style="word-wrap:break-word"><span class=""><div><blockquote type="cite"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On 10 Mar 2016, at 17:28, Radosław Pietruszewski &lt;<a href="mailto:radexpl@gmail.com" target="_blank">radexpl@gmail.com</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word"><div>Trailing comma is not nonsensical, there is a specific purpose in allowing it (unlike your examples), and there’s precedent in Swift already.</div><div><br></div></div></div></blockquote></div></div></div></blockquote></div></div></div></blockquote><br></div></span><div>Trailing commas enable easier re-ordering of arguments, simplify growing or compacting argument lists, and do no harm.</div><div><br></div><div>Their use in arrays and dictionaries are conventional enough that experienced programmers will not be surprised by their</div><div>presence. No one will force their use and one&#39;s internal style guide (and linters) can direct whether any individual group</div><div>adopts or ignores the addition.</div><div><br></div><div>For those of us who prefer trailing commas, it will be both a convenience and an asset. For those against, there&#39;s no harm</div><div>done. I find it unlikely that trailing commas will naturally lead to any unsafe code or produce a net negative effect on the</div><div>language or the code-base it supports.</div><div><br></div><div><br></div></div></blockquote><div><br></div><div>One concern I have is whether it might paint Swift into a corner later in terms of the syntax it may adopt for future features.  Are we sure we&#39;ll never want an omitted argument to mean something else, eg. &quot;use the defaults&quot; or &quot;splat the first two elements of the last parameter&quot;?  Or that it&#39;ll never create a grammar ambiguity with some construct we *do* want to support?</div><div><br></div><div>I&#39;m largely neutral on the feature itself.  Trailing commas have been somewhat helpful when working with some large-scale codebases - they reduce edit conflicts when adjacent lines are changed.  But I&#39;ve also seen the problem where a trailing comma was a function call that I forgot to finish.  And my code is not noticeably worse for their lack - it&#39;s just an extra 5 seconds or so to update the next line.</div><div><br></div><div>Probably my vote would be &quot;defer&quot;, and let the other changes slated for Swift 3 &amp; 4 work there way out.  Then we could see how the language evolves in syntax, and how big a problem this is in practice, and then add trailing commas in a year or two if people still believe it&#39;s a good idea.</div><div><br></div></div></div></div>