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

Curt Clifton curt at omnigroup.com
Sat Mar 12 13:18:35 CST 2016


> 
> The proposal is available here:
> 
>    https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md
> 
   • What is your evaluation of the proposal?

+1. The baroque set of rules for external parameter was one of the most confusing and frustrating parts of Swift 1. Swift 2 substantially improved on this situation. The proposed change will rationalize this part of the language, substantially reducing Swift's complexity.

   • Is the problem being addressed significant enough to warrant a change to Swift?

Definitely.

   • Does this proposal fit well with the feel and direction of Swift?

Yes. Swift 3 is about increasing power while reducing incidentally complexity. This is a strong contribution to the latter.

   • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

I really appreciate that Swift follows Objective-C in using named parameters. This results in much more readable client code. That said, Objective-C's syntax necessitates combining the action part of a method's name with the first parameter label. Breaking with that is a sensible thing to do. Programmers will still retain the ability to suppress any external parameter name, including the first, so the expressive power of the language is unchanged.

Turning this question on its head, I've never used a language with parameter naming rules as complex as Swift's. This proposal rectifies that problem.

   • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

I read the proposal in detail twice. I've been bothered by the complexity of the external parameter rules since Swift was introduced, so the problem has been on my mind since WWDC 2014.

Cheers, 

Curt 
------------------------- 
Curt Clifton, PhD Software Developer 
The Omni Group 
www.curtclifton.net 


More information about the swift-evolution mailing list