[swift-evolution] [RFC] "Library Evolution Support in Swift ('Resilience')"

Charles Srstka cocoadev at charlessoft.com
Mon Feb 8 21:37:35 CST 2016

> On Feb 8, 2016, at 9:24 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> The library author still needs to document what the default behavior is anyway, so that users know if they want it, and they need to be very careful in changing existing programs, so that they don't break anyone who was depending on the old behavior

It seems to me that using a default parameter means you don’t care about its value. If you explicitly want a certain value, and especially if you’re *depending* on a certain value, it would be best to supply that value explicitly. Using the default is saying “eh, do whatever you think is best."

> and they need to make sure that anybody who supplied the same value explicitly really does not want the new behavior.

It seems to me that if you explicitly provide a value to a parameter which has a default, it would appear that you want that value. Else, why go to the trouble of explicitly providing it?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160208/c97b3bf3/attachment.html>

More information about the swift-evolution mailing list