<div dir="ltr">On Wed, Jun 14, 2017 at 3:37 PM, Vladimir.S via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 14.06.2017 21:23, Haravikk via swift-evolution wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 14 Jun 2017, at 19:08, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a> &lt;mailto:<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.<wbr>org</a>&gt;&gt; wrote:<span><br>
<br>
On Wed, Jun 14, 2017 at 1:01 PM, David Hart via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a> &lt;mailto:<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.<wbr>org</a>&gt;&gt; wrote:<br>
<br>
    Sorry, initially sent off-list:<br>
<br>
    I think this proposal is a great idea. But I would vote for the alternative of<br>
    only having default and implicitly deducing extend when default is not specified:<br>
<br>
<br>
This wouldn&#39;t work with the fundamental design decision that these are optional keywords, which IMO is absolutely key.<br>
</span></blockquote><span>
<br>
Hmm, I&#39;m inclined to agree with David that only the default keyword really seems like it&#39;s necessary, and that extend can be implied.<br>
<br>
</span></blockquote>
<br>
I&#39;m not so sure. If they are optional, then it depends on developer if he/she wants to explicitly mark some func to avoid possible errors. Please look here :<br>
<br>
1. First we have this<br>
<br>
protocol A {<br>
  func foo() {}<br>
}<br>
<br>
and we  write extension (possible in another file)<br>
<br>
extension A {<br>
  extent func bar() {} // I&#39;m sure currently I want *additional* &#39;bar&#39; method<br>
}<br>
<br>
2. Then &#39;A&#39; protocol has been changed for some reason :<br>
<br>
protocol A {<br>
  func foo() {}<br>
  func bar() {}<br>
}<br>
<br>
Now, if we have &#39;extent&#39; - we(compiler) can detect the problem here(&#39;bar&#39; was not the default implementation for A&#39;s requirement). Without &#39;extent&#39; - &#39;bar&#39; will be default implementation without our intent for this.<br>
<br>
So, in case suggested keywords are both optional - IMO we need both.<br>
In case &#39;default&#39; is required - then yes, we need only it.<br></blockquote><div><br></div><div>Yes, I think we are all in vigorous agreement about this. The question is whether, at this point in Swift&#39;s evolution, a wide-ranging migration due to a new required keyword will be well tolerated. If not, then the solution is constrained.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
My preference would be to just add the default keyword, and have breaches treated as warnings using the current behaviour, which we can eliminate and elevate to an error in future once people have had a chance to change their code.<br>
<br>
<br></span><span>
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>
<br>
</span></blockquote><div class="m_-1838139386318633016HOEnZb"><div class="m_-1838139386318633016h5">
______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailma<wbr>n/listinfo/swift-evolution</a><br>
</div></div></blockquote></div><br></div></div>