<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On 14 Jun 2017, at 22:37, Vladimir.S via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 14.06.2017 21:23, Haravikk via swift-evolution wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On 14 Jun 2017, at 19:08, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a> &lt;<a href="mailto:swift-evolution@swift.org" class="">mailto:swift-evolution@swift.org</a>&gt;&gt; wrote:<br class=""><br class="">On Wed, Jun 14, 2017 at 1:01 PM, David Hart via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a> &lt;<a href="mailto:swift-evolution@swift.org" class="">mailto:swift-evolution@swift.org</a>&gt;&gt; wrote:<br class=""><br class=""> &nbsp;&nbsp;&nbsp;Sorry, initially sent off-list:<br class=""><br class=""> &nbsp;&nbsp;&nbsp;I think this proposal is a great idea. But I would vote for the alternative of<br class=""> &nbsp;&nbsp;&nbsp;only having default and implicitly deducing extend when default is not specified:<br class=""><br class=""><br class="">This wouldn't work with the fundamental design decision that these are optional keywords, which IMO is absolutely key.<br class=""></blockquote>Hmm, I'm inclined to agree with David that only the default keyword really seems like it's necessary, and that extend can be implied.<br class=""></blockquote><br class="">I'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 class=""><br class="">1. First we have this<br class=""><br class="">protocol A {<br class=""> &nbsp;func foo() {}<br class="">}<br class=""><br class="">and we &nbsp;write extension (possible in another file)<br class=""><br class="">extension A {<br class=""> &nbsp;extent func bar() {} // I'm sure currently I want *additional* 'bar' method<br class="">}<br class=""><br class="">2. Then 'A' protocol has been changed for some reason :<br class=""><br class="">protocol A {<br class=""> &nbsp;func foo() {}<br class=""> &nbsp;func bar() {}<br class="">}<br class=""><br class="">Now, if we have 'extent' - we(compiler) can detect the problem here('bar' was not the default implementation for A's requirement). Without 'extent' - 'bar' will be default implementation without our intent for this.<br class=""><br class="">So, in case suggested keywords are both optional - IMO we need both.<br class="">In case 'default' is required - then yes, we need only it.<br class=""></div></div></blockquote><div><br class=""></div><div>I think a good plan would be to make default required in a later Swift version (Swift 5) for example, and only warn for now. If I remember correctly, the Core Team has redefined source-stability as the ability for the compiler to continue to compile a previous version of Swift without new errors, but gives us a little bit of wiggle room to introduce some new errors in new versions of Swift (see Swift 4 for example).</div><div><br class=""></div><div>I see two ways:</div><div><br class=""></div><div><ul class="MailOutline"><li class="">Either we acknowledge that this proposal is important for the future of Swift and we are ready to impose a future version of Swift making default required,</li><li class="">Or if its not, we need to keep both keywords and they need to stay optional. In that case, I would personally reconsider the usefulness of the proposal: it would introduce a feature that is not easily discoverable, introduces a new keyword, and is more complex than it ought to be.</li></ul><div class=""><br class=""></div><div class="">Of course, my opinion is that it’s definitely worth the breakage in a future version of Swift.</div><div class=""><br class=""></div><div class="">David.</div></div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class=""><blockquote type="cite" class="">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 class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></blockquote>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></body></html>