[swift-evolution] named parameters
2th at gmx.de
Fri Jan 22 16:59:40 CST 2016
> If the library author decides to change the internal name, it's now a source-breaking change for clients. (Alternately, all the existing internal names are now external names, without any thought given to them, which would be just as bad.)
Imho this is no good argument — you can extend it to ban all labels.
>> Additionally, there is a hidden(?) feature in Swift that's imho quite cool:
>> The ability to call a function with a tuple containing the arguments
>> let args = (4.0, exponent: 4.0)
>> In this case, you end up with a first parameter without any indication of its role.
> This feature is likely to get redesigned soon. (It has other problems.)
Can you elaborate? I did not encounter many usecases yet, but I think it could be handy to configure a bunch of similar objects — and if it would be possible to capture the parameter tuple inside the called function, this could be forwarded to a function with the same signature easily… (especially, but not only the implementation of super)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution