<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 Jul 11, 2016, at 08:13, Leonardo Pessoa <<a href="mailto:me@lmpessoa.com" class="">me@lmpessoa.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Jean, given this proposal it will be possible if the developer of the<br class="">library intends so. You'll have to have unsealed classes to be able to<br class="">subclass them and unsealed methods so you can override. It is possible<br class="">to just allow subclassing without allowing overriding, just like<br class="">final.<br class=""><br class="">As for conflicts I don't think so. If you declare a new method with<br class="">the same name as an existing one without overriding, it will become a<br class="">new method and the base class won't even know that new method exists.<br class="">C# allows this but uses the keyword new (instead of override) to<br class="">clarify a new method is being introduced instead of the existing one<br class="">but as far as I see there is no such need in Swift. I'm also not sure<br class="">we can override a method inside an extension but if so, this provides<br class="">a new point of extension inside a class that is not subclassable.</div></div></blockquote><br class=""></div><div>This is something you’d need if the client were itself a library that couldn’t break backwards-compatibility by renaming its conflicting method. We could either have a “new” or “nonoverriding” annotation or a way to rename methods while preserving their binary interface, but </div><div><br class=""></div><div>You cannot safely override a method inside an extension unless you also control the original method. See my analysis in this <a href="https://github.com/jrose-apple/swift-evolution/blob/dc5b0cd7d646c161ede08800cdb4ec90286c6a44/proposals/nnnn-overridable-members-in-extensions.md" class="">draft of a future proposal</a>.</div><div><br class=""></div><div>Jordan</div><br class=""></body></html>