<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 Dec 14, 2015, at 12:37 AM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><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="">&lt;snip&gt;</div><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=""><div class="">Personally, I have always thought that protocols intended to be used as unbound existentials (not P&lt;A: Int&gt;, just plain P) are different beasts entirely from the kind used as generic constraints and should be explicitly declared as such—I don't think I've ever seen a protocol that is well-used in both ways; if you have counterexamples I'd love to see them. &nbsp;In "existential protocols," declaring an associated type or creating a self requirement would be an error at the point of declaration. &nbsp;</div></div></div></blockquote></div><br class=""><div class="">I recently gave a talk on protocols and protocol oriented programming, and while writing it I came up with three kinds of protocols:</div><div class=""><br class=""></div><div class="">- Basic protocols, without type aliases or parents with type aliases, usable against any value or class type</div><div class="">- Objective-C protocols, without the possibility of type aliases, restricted to being implemented by Objective-C classes and supporting optional methods</div><div class="">- “Deferred Type” protocols, with type aliases or a parent with a type alias, where conformance is too flexible for the protocol to be used safely without the compiler knowing the implementing type. These protocols are only usable in a context where the compiler can figure out the conforming type, which it then uses statically</div><div class=""><br class=""></div><div class="">I lamented that protocol is used to describe the third type as well as the first two.</div><div class=""><br class=""></div><div class="">-DW</div></body></html>