[swift-evolution] Allowing trailing commas in argument lists

Goffredo Marocchi panajev at gmail.com
Thu Mar 10 15:42:51 CST 2016


+1 strongly agree with Erica. I do not see huge realistic side effects and helping to improve diff's and thus code reviews is a big and important plus :).

Sent from my iPhone

> On 10 Mar 2016, at 20:27, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
> 
>>>> On 10 Mar 2016, at 17:28, Radosław Pietruszewski <radexpl at gmail.com> wrote:
>>>> 
>>>> Trailing comma is not nonsensical, there is a specific purpose in allowing it (unlike your examples), and there’s precedent in Swift already.
>>>> 
> 
> Trailing commas enable easier re-ordering of arguments, simplify growing or compacting argument lists, and do no harm.
> 
> Their use in arrays and dictionaries are conventional enough that experienced programmers will not be surprised by their
> presence. No one will force their use and one's internal style guide (and linters) can direct whether any individual group
> adopts or ignores the addition.
> 
> For those of us who prefer trailing commas, it will be both a convenience and an asset. For those against, there's no harm
> done. I find it unlikely that trailing commas will naturally lead to any unsafe code or produce a net negative effect on the
> language or the code-base it supports.
> 
> -- Erica
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160310/87e20061/attachment.html>


More information about the swift-evolution mailing list