<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=""><div><blockquote type="cite" class=""><div class="">On May 25, 2016, at 7:07 AM, Thorsten Seitz via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div class=""><div class="">This is unfortunate, because then the meaning of "existential" and "non-existential" in Swift are just the opposite of their respective meaning in standard terminology :-(</div></div></div></blockquote><div><br class=""></div>I don't know what you mean by this. &nbsp;The standard terminology is that an existential type is one that's directly existentially-quantified, e.g.&nbsp;∃ t . t, which is essentially what a Swift protocol type is:</div><div>&nbsp; P ::=&nbsp;∃ t : P . t</div><div>&nbsp; P.Type ::=&nbsp;∃ t : P . t.Type</div><div>etc. &nbsp;Language operations then implicitly form (erasure) and break down (opening) those qualifiers in basically the same way that they implicitly break down the universal quantifiers on generic functions.</div><div><br class=""></div><div>If you're thinking about Haskell, Haskell's existential features are carefully tied to constructors and pattern-matching in part because erasure is a kind of implicit conversion, which would not fit cleanly into Haskell's type system. &nbsp;(Universal application also requires an implicit representation change, but that doesn't need to be reflected in H-M systems for technical reasons unless you're trying to support higher-rank polymorphism; I'm not up on the type-checking literature there.)</div><div><br class=""></div><div>John.</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class=""><br data-mce-bogus="1" class=""></div><div class="">-Thorsten<br data-mce-bogus="1" class=""></div><div class=""><br data-mce-bogus="1" class=""></div><div class=""><br class="">Am 25. Mai 2016 um 14:27 schrieb Brent Royal-Gordon &lt;<a href="mailto:brent@architechies.com" class="">brent@architechies.com</a>&gt;:<br class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="msg-quote"><div class="_stretch"><span class="body-text-content"><blockquote type="cite" class="quoted-plain-text">AFAIK an existential type is a type T with type parameters that are still abstract (see for example <a href="https://en.wikipedia.org/wiki/Type_system#Existential_types" data-mce-href="https://en.wikipedia.org/wiki/Type_system#Existential_types" class="">https://en.wikipedia.org/wiki/Type_system#Existential_types</a>), i.e. have not been assigned concrete values.</blockquote><br class="">My understanding is that, in Swift, the instance used to store something whose concrete type is unknown (i.e. is still abstract), but which is known to conform to some protocol, is called an "existential". Protocols with associated values cannot be packed into normal existentials because, even though we know that the concrete type conforms to some protocol, the associated types represent additional unknowns, and Swift cannot be sure how to translate uses of those unknown types into callable members. Hence, protocols with associated types are sometimes called "non-existential".<br class=""><br class="">If I am misusing the terminology in this area, please understand that that's what I mean when I use that word.<br class=""><br class="">-- <br class="">Brent Royal-Gordon<br class="">Architechies<br class=""><br class=""></span></div></div></blockquote></div></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>