[swift-evolution] [Review] SE-0046 Establish consistent label behavior across all parameters including first labels

Erica Sadun erica at ericasadun.com
Sun Mar 13 17:09:36 CDT 2016


> On Mar 13, 2016, at 3:35 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> 	https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md
> 
>> 	• What is your evaluation of the proposal?
> 
> I think it's a great idea. In previous versions of Swift, the inconsistent treatment of function parameters was justified—barely—by the fact that standard Swift style left most arguments unlabeled. Now that the API guidelines now call for many functions to label their first parameters, this justification has been fatally weakened.
> 
> Now that we're going to have consistent rules everywhere else, I think the design team should also consider applying the same rules to subscripts. Unlike functions, subscripts still *do* usually have unlabeled first parameters, but they are written so rarely that I'm not sure it's worth being inconsistent with literally every other parameter construct in the language.

As I mention in the proposal, I consider subscripts distinct, playing a different role in the language. 
I do not have any problem with the existing implementation or their optional labels.

-- E



More information about the swift-evolution mailing list