<div dir="ltr">I did not mean that but I can sort of see how you came to that. My intent was that `final func doIt()` is a statement that `Foo.doIt()` is provided in the same module but is not dynamic. It would be the same as what currently happens when a method is not in a protocol but a default implementation is provided.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 9, 2015 at 4:00 PM, Gwendal Roué <span dir="ltr"><<a href="mailto:gwendal.roue@gmail.com" target="_blank">gwendal.roue@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> Le 9 déc. 2015 à 11:22, T.J. Usiyan <<a href="mailto:griotspeak@gmail.com">griotspeak@gmail.com</a>> a écrit :<br>
><br>
> I actually suggest something along the lines of<br>
><br>
> protocol Foo {<br>
> final func doIt() -> String<br>
> }<br>
><br>
> extension Foo {<br>
> final func doIt() -> String {<br>
> print("I did it.")<br>
> }<br>
> final func doThat() {<br>
> print("I did that.")<br>
> }<br>
> }<br>
><br>
> to indicate that foo will be provided in this module and is not ever to be dynamically dispatched. This draws attention to the fact that dispatch is static in a clear consistent manner.<br>
><br>
> TJ<br>
<br>
</span>In this particular example, do you mean that a class that implements Foo would have to declare its own doIt() as final, and can not implement its own doThat() ?<br>
<br>
class C : Foo {<br>
final func doIt() -> String { … } // final required<br>
final func doThat() { … } // illegal<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
Gwendal<br>
<br>
</font></span></blockquote></div><br></div>