• 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: Jens Alfke <email@hidden>
  • Date: Wed, 24 Jun 2015 14:42:46 -0700

> On Jun 24, 2015, at 2:09 PM, Rick Mann <email@hidden> wrote:
>
> But I don't understand the need to require the use of external names at the call site. If there's enough information available to the compiler at the call site to unambiguously choose a function or method to call, why must I supply the parameter names?

There isn’t always enough information, when there are optional parameters. Without keywords it can be ambiguous which parameters have been omitted.

Also, can’t functions be overloaded by using different parameter names, the way methods can?

—Jens

_______________________________________________

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


  • Follow-Ups:
    • Re: Swift and parameter names
      • From: Rick Mann <email@hidden>
References: 
 >Swift and parameter names (From: Rick Mann <email@hidden>)

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