<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="">&nbsp;</div><span class="">protocol&nbsp;Protocol<br class=""></span><span class="">{<br class=""></span><span class="">&nbsp; &nbsp;&nbsp;typealias&nbsp;Argument<br class=""></span><span class="">&nbsp; &nbsp;&nbsp;<br class=""></span><span class="">&nbsp; &nbsp;&nbsp;func&nbsp;function()<br class=""></span><span class="">&nbsp; &nbsp;&nbsp;func&nbsp;function(_:&nbsp;Argument)<br class=""></span><span class="">}<br class=""></span><span class="">&nbsp;<br class=""></span><div class=""><div><blockquote type="cite" class=""><div class="">On 16-Jan-2016, at 3:29 PM, 肇鑫 &lt;<a href="mailto:owenzx@gmail.com" class="">owenzx@gmail.com</a>&gt; 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="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</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="">
&nbsp; &nbsp; typealias Argument<br class="">
<br class="">
&nbsp; &nbsp; 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>