Swift: Tutorial

swiftHaving recently purchased an Apple Watch, I’ve decided to learn Swift so that I can write a couple of Apps. So far, I’ve been very impressed with the language.

Here’s the link to the tutorial.

However, I’m completely bemused by the rules for named parameters. Unlike in F#, which optionally supports named parameters in calls to function if you want to use them, Swift 2.0 enforces that you must use them (except where you mustn’t, like the first parameter in the call). Seriously? I understand that, for functions with multiple parameters of the same type, it can be helpful to name the parameters – but making that a requirement on every call will seriously reduce productivity.  And what about refactoring – if I change the name of a parameter, will I have to change its name at all call sites as well?

Leave a comment

Filed under Swift

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s