Document correction: Section: Function Argument Labels and Parameter Names

In Swift 4.1 document beta:


“By default, parameters use their parameter name as their argument label.” (Section: Function Argument Labels and Parameter Names)

It should be: “By default, functions use …”

See reference below:

“By default, functions use their parameter names as labels for their arguments.” (Section: Functions and Closures)

From the documentation:

  • Each function parameter has both an argument label and a parameter name. […] each argument is written in the function call with its argument label before it. […]

In this context, the argument label and parameter name belong to a function parameter, not a function.

Hence, there is nothing semantically wrong with the sentence you refer to. Rather, you took it out of context.

Is the second sentence from the old doc?

P.S. I think it is more convenient to report on doc issues in Apple’s Bug Reporter rather than here.

Both sentences are from the latest 4.1 beta doc.