[swift-evolution] Carriage Return in Collection Array Literal Initializer

Rainer Brockerhoff rainer at brockerhoff.net
Thu Apr 28 05:57:52 CDT 2016


On 4/28/16 00:00, Erica Sadun via swift-evolution wrote:
>> On Apr 27, 2016, at 3:00 PM, Alex Martini via swift-evolution <swift-evolution at swift.org> wrote:
>> A comma is already allowed after the last element in an array or dictionary literal:
> 
> And is very appreciated!! I wish the same courtesy were extended to parameter lists.

In general, I wish that in all such situations — when the parser expects
_either_ a comma or a closing token — it would be acceptable to use a
line break instead of the comma, or _both_ comma and closing token.

In analogy to statements, which can be delimited by semicolons or line
breaks.

-- 
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