• 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:42:14 -0700

> On Jun 24, 2015, at 16:37 , Marco S Hyman <email@hidden> wrote:
>
> On Jun 24, 2015, at 4:09 PM, Rick Mann <email@hidden> wrote:
>>
>> I guess I disagree: it's obvious in most cases. Again, I'm just arguing for the OPTION. You can always choose to use the parameter name if you wish.
>
> You have the option.  Given this signature:
>
>   func foo(intArg: Int, stringArg: String) -> Bool { ... }
>
> add this code to call the function without named arguments.
>
>   func foo(intArg: Int, _ stringArg: String) -> Bool {
>       return foo(intArg, stringArg: stringArg)
>   }
>
> Now you can call it either way.
>
> I like that I do NOT have the ability to mix and match calling conventions
> by accident which could possibly confuse code readers. Especially when I am
> the code reader!  If I really need the the option to do mix styles adding
> code such as that above wouldn’t be an issue.

Again, pretty huge burden.


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


  • Follow-Ups:
    • Re: Swift and parameter names
      • From: Marco S Hyman <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>)

  • Prev by Date: Re: Swift and parameter names
  • 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