[swift-evolution] [Review] SE-0084: Allow trailing commas in parameter lists and tuples

Eduardo Mourey Lopez Ne edmourey at icloud.com
Tue May 10 14:38:10 CDT 2016


I will like to suggest the alternative 
that consists in eliminating the use of "," since the compiler is able to know here they are expected, automatic watermarks can be added by Xcode to indicate where the compiler is automatically adding the comas. 
also use of a “..” watermark  at the end of a line will indicate that it continues on the next line, it will also be added on the start of the next line as well.

Optionally watermark numbers can be added to indicate the number of elements in a line or the accumulated total

This change will make it easier for user to rearrange list, and eliminate the “Expected ‘,’ separator” error without making the code less safe or less readable. It also doesn’t have any impact on existing code since the user could still use the “,” manually

There could be cases were the user will still need to type “,” if the grammar is ambiguous 

The use of the ";" can also be eliminated using similar logic 


> On May 10, 2016, at 2:05 PM, Karl Wagner via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On 10 May 2016, at 20:53, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> Hello Swift community,
>> 
>> The review of "SE-0084: Allow trailing commas in parameter lists and tuples" begins now and runs through May 16. The proposal is available here:
>> 
>> 	https://github.com/apple/swift-evolution/blob/master/proposals/0084-trailing-commas.md
>> 
>> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
>> 
>> 	https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
>> or, if you would like to keep your feedback private, directly to the review manager.
>> 
>> What goes into a review?
>> 
>> The goal of the review process is to improve the proposal under review through constructive criticism and contribute to the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
>> 
>> 	* What is your evaluation of the proposal?
>> 	* Is the problem being addressed significant enough to warrant a change to Swift?
>> 	* Does this proposal fit well with the feel and direction of Swift?
>> 	* If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
>> 	* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
>> 
>> More information about the Swift evolution process is available at
>> 
>> 	https://github.com/apple/swift-evolution/blob/master/process.md
>> 
>> Thank you,
>> 
>> -Chris Lattner
>> Review Manager
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> I would love this, but I’d hate any language which allows it.
> 
> Maybe we could degrade it to a warning instead of a compile error? So it’d be fine in scripts and when debugging, but you’ll be reminded that leaving it that way is not cool.
> _______________________________________________
> 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/20160510/a1e81f20/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _Swift_Comma_Sugestion_xcf-2_0__RGB_color__1_layer__531x204_?_GIMP 2.png
Type: image/png
Size: 13004 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160510/a1e81f20/attachment.png>


More information about the swift-evolution mailing list