<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="">Le 7 janv. 2016 à 19:44, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Jan 7, 2016, at 12:42 PM, David James 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="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Not sure the language direction should<span class="Apple-converted-space">&nbsp;</span><i class="">encourage</i><span class="Apple-converted-space">&nbsp;</span>inheritance based structures, which abstract classes and methods do. That’s not to say that inheritance is dead, but that a modern language should encourage and support compositional patterns rather than inheritance based patterns.&nbsp;</div></div></blockquote><div class=""><br class=""></div><div class="">+1 to these comments. &nbsp;This proposal notes that protocols would provide very similar behavior if they were allowed to have stored properties. &nbsp;That has already been discussed a little bit. &nbsp;I think it would be best to decide whether that will happen or not before introducing abstract classes and methods.</div></div></div></blockquote><br class=""></div><div>I agree that the support for stored properties in protocols should definitely help avoiding the need for an abstract classes in many cases.</div><div><br class=""></div><div>The problem, though, is that abstract classes still have something that protocol do not, and this is the encapsulation of implementation details. Protocols, on the other side, are open in the wide, expose all their inner guts. The problem with convenience protocols that expose too much implementation details is that they make refactoring very difficult, if possible at all. Abstract classes don’t have this issue.</div><div><br class=""></div><div>So I think protocols still have a long, long, way before they can match abstract classes.</div><div><br class=""></div><div>Gwendal</div><div><br class=""></div></body></html>