[swift-evolution] named parameters - why hidden first?/proposal interest

Charles Constant charles at charlesism.com
Sat Jan 23 17:06:11 CST 2016


> but what I found was that my APIs generally fell in line naturally with
> the defaults.

And when they didn't, looking for a way to take advantage of the defaults
> often
> led to a better API


I'm not sure I follow this. A change would result in:

Pros:
- the rule of "least surprise"
- developers can edit function definitions more quickly

Cons:
- one extra character (i.e.: from "*foo: Int*" to "*_ foo: Int*")
- one missed opportunity to set an example of "good style"

Am I missing something?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160123/27d47680/attachment.html>


More information about the swift-evolution mailing list