Re: Swift and parameter names
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