[swift-evolution] [Review] SE-0046 Establish consistent label behavior across all parameters including first labels
Daniel Steinberg
daniel at dimsumthinking.com
Sat Mar 12 17:49:28 CST 2016
+1
I am a big fan of this proposal.
In a function or method that has more than one parameter, I strongly favor the consistent use of labels.
For a function or method that has a single parameter, I don’t care whether we standardize on a label being required or not. It wouldn’t bother me that a function with a single parameter wouldn’t require a label for that parameter while an init with a single parameter would. I mention this because one of the reasons given for no label on the first parameter was that half of the functions in an audit had zero or one parameter. It is important to me that a function with multiple parameters requires labels for all of them.
As an aside, once we have this consistency, I would like guidance from Apple and support from Xcode on how to format these method definitions and calls if we place them on multiple lines (each parameter on a separate line). In Obj-C we lined up the colons, in Swift should we line up the colons, the first letter of the parameter label, something else? It’s not that I care what we choose, but it would be nice to have a consistent format that is supported by Xcode. Currently, if we indent in a way other than is supported by Xcode, subsequent lines are indented awkwardly.
Thanks,
Daniel
> On Mar 11, 2016, at 1:01 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>
> Hello Swift community,
>
> The review of “Establish consistent label behavior across all parameters including first labels” begins now and runs through March 15, 2016. The proposal is available here:
>
> https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.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. When replying, please try to keep the proposal link at the top of the message:
>
> What goes into a review?
>
> The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine 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
> Review Manager
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list