[swift-evolution] [Review] SE-0066: Standardize function type argument syntax to require parentheses

Thorsten Seitz tseitz42 at icloud.com
Wed Apr 27 03:53:52 CDT 2016


I am strictly against requiring parentheses in closure expressions. Parentheses are visual clutter if not really needed and for a closure expression there is no need for parentheses as the parameter list is already nicely bracketed by `{ ... in`.

Actually I would argue that parentheses around parameter lists in closure expressions should be prohibited for that reason.



I'm not fond of requiring parentheses around single non-tuple parameters in type declarations either but I could probably grudgingly live with that change.

But keep away from closure expressions, please! There is nothing ambiguous there.



-Thorsten




Am 27. April 2016 um 00:07 schrieb David Owens II via swift-evolution <swift-evolution at swift.org>:




On Apr 26, 2016, at 1:31 PM, Chris Lattner <clattner at apple.com> wrote:




On Apr 25, 2016, at 11:28 PM, David Owens II via swift-evolution <swift-evolution at swift.org> wrote:


What is your evaluation of the proposal?

I reluctantly agree with the proposal with the following caveat: I do not agree with the rationale to support being able to choose to omit the () for the parameter list of the closure declaration.


I see no cohesive argument that says that the parens should be required in some cases but not in others when talking about parameter lists.


I believe the proposal should be amended that the following should be the only allowable forms:


Hi David,


To be clear, this proposal is not about changing closure expressions, it was just a FAQ, and the section at the end is simply my personal opinion.  Changing closure expression syntax would be a separate proposal.


My argument is changing the parameter list in one context but not the other is only solving one of the potentially ambiguous use cases instead of the general case. My opinion is they should be changed as the same time if they are going to be changed at all.


-David


_______________________________________________
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/20160427/cf1a9580/attachment.html>


More information about the swift-evolution mailing list