Re:The Curious Case of Swift's Adoption of Smalltalk Keyword...
by yoz-y on Sunday June 14, 2020 @12:44PM
(#23519145)
That's why Swift does support unnamed parameters as well, and they can interweave with named ones. If the type of the argument is explicit enough, you can make the parameter name at call site optional.
[ Parent
| on HN ]
Re:The Curious Case of Swift's Adoption of Smalltalk Keyword...
by wool_gather on Sunday June 14, 2020 @01:16PM
(#23519438)
Nitpick (I think this is just a miswording rather than a misunderstanding): it's not optional. You can have unlabelled args, but that's enforced too: the label must be included or omitted at the call site according to the function declaration.