[swift-evolution] [swift-evolution-announce] [Review] SE-0084: Allow trailing commas in parameter lists and tuples
Rainer Brockerhoff
rainer at brockerhoff.net
Thu May 12 09:04:55 CDT 2016
On 5/12/16 10:52, Vladimir.S via swift-evolution wrote:
> 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.
Agreed. Everyone can use whatever feels best. Teams will mandate some
specific style, anyway.
> 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? ;-)
I use commas with items on the same line, and semicolons with statements
on the same line. ;-)
Now, the choice of when to put items or statements on the same line
varies...
--
Rainer Brockerhoff <rainer at brockerhoff.net>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
http://brockerhoff.net/blog/
More information about the swift-evolution
mailing list