[swift-evolution] Default Generic Arguments

David Sweeris davesweeris at mac.com
Thu Jan 26 09:56:24 CST 2017


> On Jan 24, 2017, at 15:33, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> 
> As I replied above, this doesn't work IMO because omitted generic arguments are inferred, and that can't change without being hugely source-breaking.
> 
> I think it's absolutely essential that adding a default to my library doesn't change the behavior of code that uses my library. That's currently the case, afaict, for all default arguments, and so I think it's essential here.

There is a difference, though, in that default values can't be inferred... Simply adding a default value for a function argument can't change the behavior of anything because, prior to adding it, any code that didn't provide that value wouldn't have compiled.

- Dave Sweeris 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170126/4c5fd2fe/attachment.html>


More information about the swift-evolution mailing list