• 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: Britt Durbrow <email@hidden>
  • Date: Wed, 24 Jun 2015 23:49:51 -0700

IMHO, named parameters at call sites are one of the things that makes Objective-C great; and I am VERY happy that Swift-2 enforces this.

It is not any additional burden in any modern IDE to have this; as the IDE’s autocomplete fills in the parameter names for you.

Also, consider a body of code that has inferred parameters in it… and now you need to add a new function; which makes the inferred call sites ambiguous.  At best this will require some complicated regex replacement operations across the whole code base before it will compile again; at worst it will be unfixable (if you don’t have the source code and the binary that you are trying to link against doesn’t have enough information for the linker to resolve the ambiguity (I don’t know enough about Swift’s intermediate format to say if it does or not); or for some reason you do have the source code but are forbidden from modifying it).
_______________________________________________

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: email@hidden
References: 
 >Swift and parameter names (From: Rick Mann <email@hidden>)
 >Re: Swift and parameter names (From: Greg Parker <email@hidden>)
 >Re: Swift and parameter names (From: Rick Mann <email@hidden>)
 >Re: Swift and parameter names (From: Alex Kac <email@hidden>)
 >Re: Swift and parameter names (From: Rick Mann <email@hidden>)
 >Re: Swift and parameter names (From: Alex Kac <email@hidden>)
 >Re: Swift and parameter names (From: Rick Mann <email@hidden>)
 >Re: Swift and parameter names (From: Marco S Hyman <email@hidden>)
 >Re: Swift and parameter names (From: Rick Mann <email@hidden>)
 >Re: Swift and parameter names (From: Marco S Hyman <email@hidden>)

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