|
|
|
|
|
by mikeash
3822 days ago
|
|
Yes, that's true, but note that you only need to specify the external names on the parameters that depart from the default. A function with external names on every parameter looks like: func whatever(a a: Int, b: Int, c: Int)
A function with no external names on any parameter looks like: func whatever(a: Int, _ b: Int, _ c: Int)
I'm not sure if you understood that or thought they all had to be specified if any were, but in any case that's how it looks.As for "that could trivially be done," that applies to a lot of language features in a lot of languages. Virtually all language features are redundant in that fashion, yet they can still be useful by adding brevity and clarity. |
|
I find Scala's handling of named arguments much saner.