Re: Swift and parameter names
Re: Swift and parameter names
- Subject: Re: Swift and parameter names
- From: Rick Mann <email@hidden>
- Date: Wed, 24 Jun 2015 16:35:12 -0700
> On Jun 24, 2015, at 14:53 , Greg Parker <email@hidden> wrote:
>
> Swift 2 established a single default naming rule for all methods and global functions. Swift 1 had two different rules which was confusing. The naming rule (first parameter un-named, additional parameters named) was chosen because it is the best fit with Cocoa methods and most one-argument functions.
Is there a difference between init() and func...? I'm getting a warning for a func I wrote:
Extraneous '_' in parameter: 'inX' has no keyword argument name
But not for the init() method with the same signature.
--
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