<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">It serves as a better (if not simpler) substitute for the following pattern:</div><div class=""> </div><span class="">protocol Protocol<br class=""></span><span class="">{<br class=""></span><span class=""> typealias Argument<br class=""></span><span class=""> <br class=""></span><span class=""> func function()<br class=""></span><span class=""> func function(_: Argument)<br class=""></span><span class="">}<br class=""></span><span class=""> <br class=""></span><div class=""><div><blockquote type="cite" class=""><div class="">On 16-Jan-2016, at 3:29 PM, 肇鑫 <<a href="mailto:owenzx@gmail.com" class="">owenzx@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:georgia,serif">I wonder where is the good for a protocol designer on this?<br class=""></div><div class="gmail_default" style="font-family:georgia,serif"><br class=""></div><div class="gmail_default" style="font-family:georgia,serif">zhaoxin</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Jan 16, 2016 at 5:23 PM, Vatsal Manot via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Currently, the following the code fails with multiple errors:<br class="">
<br class="">
protocol Protocol<br class="">
{<br class="">
typealias Argument<br class="">
<br class="">
func function(argument: Argument = default)<br class="">
}<br class="">
<br class="">
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.<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><br class="">Owen Zhao<br class=""></div></div></div>
</div></div>
</div></blockquote></div><br class=""></div></body></html>