External Parameter Name in Swift

I was never a big fan of external parameter names in Objective-C. It leads to too much typing. Example of external parameter names in action shown in boldface below:

[[[UIAlertView alloc] initWithTitle:@"A Message"
  message: @"Hello World"
  otherButtonTitles:nil] show];

Supporters claim that this leads to better readability. But, I disagree. I have never felt the need for this when coding in C or Java.

Needless to say that I was sad to see external parameter names repeated in Swift. To make things worse, the rules have become inconsistent. I will try to summarize the rules in this article.

Continue reading