[swift-evolution] named parameters - why hidden first?/proposal interest

Dave Abrahams dabrahams at apple.com
Thu Jan 21 14:09:03 CST 2016


on Thu Jan 21 2016, Tony Parker via swift-evolution <swift-evolution-m3FHrko0VLzYtjvyW6yDsg-AT-public.gmane.org> wrote:

> We surveyed the entire surface area of the iOS and OS X SDKs, looking
> to see how many arguments typical methods had. We found that the vast
> majority of methods actually have just one argument. If we went with a
> rule that first arguments should be named, then methods like:
>
> sayMessage(“hello”)
>
> would be this instead:
>
> say(message: “hello”)
>
> which isn’t really much of an improvement, in my mind.

No, but

    say("hello")

is a big improvement, which IMO perfectly illustrates why we want the
default as it is.

That said, as the API Guidelines review is to start imminently, I'd like
to ask people to hold off discussing this topic further until we start
the review, so we can gather all the related commentary in one place.

Thanks!




More information about the swift-evolution mailing list