• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Swift and parameter names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Swift and parameter names (From: Rick Mann <email@hidden>)
 >Re: Swift and parameter names (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: Scripting Bridge Questions
  • Next by Date: Re: Does NSObject have a "super" ?
  • Previous by thread: Re: Swift and parameter names
  • Next by thread: Overlapping NSViews and mouseDown Events
  • Index(es):
    • Date
    • Thread