[swift-evolution] Enhanced existential types proposal discussion

Charles Srstka cocoadev at charlessoft.com
Sun May 29 17:43:28 CDT 2016


> On May 29, 2016, at 5:16 PM, Austin Zheng <austinzheng at gmail.com> wrote:
> 
> I think the problem here is that P == P is true, but P : P is not (a protocol does not conform to itself).

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.

> 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.

Will do.

Charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160529/e30b0d8c/attachment.html>


More information about the swift-evolution mailing list