Swift Named Parameters
The rules for naming parameters in Swift functions and methods have changed for the better over the last few releases but still seem to cause confusion. Here is my quick summary updated for Swift 2.1.
External vs Local Names The key to understanding parameter names in Swift is to remember that parameter names can have both an external and a local name:
Local parameter names are used in the body of the function/method External parameter names are used when calling the function/method. The default rules mean that most of the time you do not need to think too much about external names (at least since Swift 2.1):
Use Your Loaf - iOS Development News & Tips