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

Tikitu de Jager tikitu at logophile.org
Sat Mar 12 06:06:29 CST 2016


> Proposal link:
>
> https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md

> • What is your evaluation of the proposal?

+1

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

Yes. It's a confusion for new Swift learners, especially those 
unfamiliar with Objective C, with increasingly little upside.

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

Yes: it removes two special cases (first args work differently to other 
args; but not for inits) which fits the language goal of overall 
consistency, and it fits Swift's movement away from the constraints 
imposed by compatibility with Objective C conventions (instead 
supporting these by an increasingly smart translation layer).

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

Python has a bit of both:
* a frequent idiom in which some initial parameters (not necessarily 
just the first) are called positionally (without names) followed by 
named parameters; but
* no expectation that the function/method name will give type 
information for those initial parameters.

In my Python, Java, Javascript & Objective C experience, Objective C is 
the only one with a strong expectation of moving parameter-typing 
information into function/method names, and also the only one that 
systematically singles out the *first* parameter.

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

I read the proposal carefully. I've skimmed the discussion, but haven't 
seen many arguments against: there may be something I'm missing there.


More information about the swift-evolution mailing list