[swift-evolution] [Proposal] Allow protocols to require functions with default parameter values.

肇鑫 owenzx at gmail.com
Sat Jan 16 09:33:37 CST 2016


Hi Vatsal,

Can you make a formal proposal on this? I think this idea is valuable and
should be discussed formally.

I think this can solved this
<https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160111/006811.html>
too.

A formal proposal is like this
<https://github.com/apple/swift-evolution/blob/master/proposals/0020-if-swift-version.md>
.

You can learn how to do it here <https://github.com/apple/swift-evolution>.

zhaoxin

On Sat, Jan 16, 2016 at 5:23 PM, Vatsal Manot via swift-evolution <
swift-evolution at swift.org> wrote:

> Currently, the following the code fails with multiple errors:
>
> protocol Protocol
> {
>     typealias Argument
>
>     func function(argument: Argument = default)
> }
>
> I propose that we allow protocols to require functions with default
> parameter values. I can’t see any disadvantages to this, and the change
> would only be additive.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160116/24e8e549/attachment.html>


More information about the swift-evolution mailing list