Re: Swift and parameter names
Re: Swift and parameter names
- Subject: Re: Swift and parameter names
- From: Rick Mann <email@hidden>
- Date: Mon, 29 Jun 2015 15:56:50 -0700
> On Jun 29, 2015, at 15:50 , Greg Parker <email@hidden> wrote:
>
> Perhaps you would prefer a different whitespace convention, one with no spaces around the colon in actual parameters. That's a popular convention in Objective-C. Otherwise there is no difference between Objective-C and Swift here.
I never really liked it in Objective-C, either.
There's a big difference in that Swift is more like C, naming a function and then supplying the parameters in a parenthesized list. This, conceptually, makes the name and the parameter list more independent (overloading notwithstanding).
And again, I'm just suggesting the compiler do its best to infer the parameter names instead of requiring them everywhere.
Why not require variable types, as you suggested I provide when trying to diagnose the error? Surely that would made things more clear.
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden