<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 Jun 14, 2017, at 4:51 PM, David Hart 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=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><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></blockquote></div></div></blockquote></div></div></div></blockquote><blockquote type="cite" class=""><blockquote type="cite" class=""><br class=""></blockquote></blockquote><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div class=""><blockquote type="cite" class="">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>…</div></div></blockquote><div class=""><br class=""></div><div class="">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.</div></div></div></div></blockquote><div><br class=""></div><div>I like only having “default,” and I like David’s plan for achieving that.</div></div><br class=""><div class="">• • •</div><div class=""><br class=""></div><div class="">It seems that this proposal could help mitigate the problems described in the classic “Ghost of Swift Bugs Future” (<a href="https://nomothetis.svbtle.com/the-ghost-of-swift-bugs-future" class="">https://nomothetis.svbtle.com/the-ghost-of-swift-bugs-future</a>). There’s a nice new convention (I think?) of:</div><div class=""><br class=""></div><div class="">`extend` / no modifier in extension → static dispatch</div><div class="">`default` &nbsp;in extension → dynamic dispatch</div><div class=""><br class=""></div><div class="">(Does this always hold in an extensions?)</div><div class=""><br class=""></div><div class="">Knowing whether the extension’s author •intended• static or dynamic dispatch could also allow the compiler to give better warnings: about shadowing at declaration sites, and also also potentially at call sites where multiple extension methods could match depending on the compile-time type of the receiver.</div><div class=""><br class=""></div><div class="">Might it be worth describing some of these warnings out in the proposal? I realize warnings don’t require full swift-evo treatment, but it would be nice to at least sketch out in the “Impact on Existing Code” section what the warnings might look like.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Paul</div><div class=""><br class=""></div></body></html>