<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Sent from my iPad</div><div><br>On May 29, 2016, at 5:43 PM, Charles Srstka via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><blockquote type="cite" class="">On May 29, 2016, at 5:16 PM, Austin Zheng &lt;<a href="mailto:austinzheng@gmail.com" class="">austinzheng@gmail.com</a>&gt; wrote:<br class=""></blockquote><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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; float: none; display: inline !important;" class="">I think the problem here is that P == P is true, but P : P is not (a protocol does not conform to itself).</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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></blockquote><div><br class=""></div><div>But if you have a variable, parameter, etc. typed as P, that’s *not* the protocol, since protocols aren’t concrete entities. What you have there, by definition, is something that conforms to P. Similarly, something like [P] is just a collection of things, perhaps of various types, which all have the common feature that they conform to P.</div></div></div></blockquote><div><br></div>You have an existential value of type P. &nbsp;It is a well known frustration in Swift that the existential type corresponding to a protocol does not conform to the protocol. &nbsp;This has been discussed off and on at different times. &nbsp;<div><br></div><div>There are a couple of reasons this is the case. &nbsp;IIRC in some cases it actually isn't possible for the existential to conform to the protocol in a sound way. &nbsp;And even when it is possible, I believe it has been said that it is more difficult to implement than you might think. &nbsp;Hopefully the situation will improve in the future but I'm not aware of any specific plans at the moment.<div><div><br><div><div><blockquote type="cite"><div><div><br class=""><blockquote type="cite" class=""><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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; float: none; display: inline !important;" class="">I think there was some discussion about it on the original "Completing Generics" thread from March. I'd probably ask on the swift-users list why P can't be made to conform to P, and then put together a proposal if there's no good reason.</span></div></blockquote></div><br class=""><div class="">Will do.</div><div class=""><br class=""></div><div class="">Charles</div><div class=""><br class=""></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></div></div></div></div></body></html>