[swift-evolution] [swift-evolution-announce] [Review] SE-0084: Allow trailing commas in parameter lists and tuples
Vladimir.S
svabox at gmail.com
Thu May 12 08:52:51 CDT 2016
On 12.05.2016 16:22, Rainer Brockerhoff via swift-evolution wrote:
> I'm +1 on allowing either trailing commas *or* a line-break instead of
> where a comma is expected.
>
> Just as we allow a line-break where a semicolon is expected in a list of
> statements.
Well.. Although I'm still -1 on allowing trailing comma anywhere other than
array/dict initialization, and think we need just line-breaks as separator,
I feel(am I wrong?) like core team wants to accept the initial proposal(at
least replies from @apple.com are supporting the initial proposal).
So, I believe this proposal(SE-0084) should be changed to something like:
"Allow trailing commas *everywhere* in comma-separated lists(parameters,
tuples, generic type list, func/method call,etc) *and* allow line-break to
be treated as a separator in comma-separated lists"
I believe such changed proposal, if will be accepted, will suite the needs
of most developers - trailing comma + line-breaks.
But again.. will you use comma as separator in multi-line list if you can
just don't type it and 'use' line-break? Do you use semicolons in code now? ;-)
>
> -1 on making trailing commas mandatory, just as I'm against making
> semicolons mandatory again :-)
OK. Probably I was wrong regarding my suggestion to make them mandatory.
More information about the swift-evolution
mailing list