• 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: 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


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

  • Prev by Date: Re: Simple Swift question
  • Next by Date: Re: Swift and parameter names
  • Previous by thread: Re: Swift and parameter names
  • Next by thread: Re: Swift and parameter names
  • Index(es):
    • Date
    • Thread