# Unlock Existential Types for All Protocols

**URL:** <https://forums.swift.org/t/unlock-existential-types-for-all-protocols/40665>\
**Category:** Pitches\
**Tags:** associatedtype, protocol, existential\
**Created:** [September 26, 2020, 8:52pm UTC](https://forums.swift.org/t/unlock-existential-types-for-all-protocols/40665 "2020-09-26T20:52:15Z")\
**Posts on this page:** 1\
**Showing post:** 40

<div class="post-metadata">

**Author:** ![dabrahams](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dabrahams/32/9815_2.png) [@dabrahams](https://forums.swift.org/u/dabrahams)\
**Post date:** [November 7, 2020, 4:22pm UTC](https://forums.swift.org/t/unlock-existential-types-for-all-protocols/40665/40 "2020-11-07T16:22:02Z")

</div>

> It is true that the current implementation allows us to safely use an API when all the type parameters in its signature have been constrained to something non-dependent,

Presumably you mean the proposed implementation? Otherwise, I cannot imagine what you're saying.

> but constraints are not an explanation as to why we cannot use them otherwise,

Never claimed they were an explanation of anything. I said my proposed syntax points explicitly to the cure for the missing API.

> nor an answer as to whether we could do something about it in the future.

Sorry, I don't know what you mean by that. What is “it?”

> Similarly, `P where A == Int` is simply a refinement,

Not in the usual sense we use the word “refinement,” which refers to what's sometimes called ”protocol inheritance.“ I'm not sure what you mean by calling it a refinement.

> not necessarily the reason you could call `f() -> A where A: SignedInteger` or a similar method featuring a different associated type on that type.

I'm sorry, I'm afraid I don't understand what you're trying to say here either. How could the name of a type (`P where A == Int`) be the reason for anything?

> It seems like a more accurate diagnostic could make a decent enough explanation compared to any of the syntaxes hitherto mentioned.

_sigh_; [diagnostics are not a substitute for understandability](https://forums.swift.org/t/lifting-the-self-or-associated-type-constraint-on-existentials/18025/92).

---

_[View the full topic](https://forums.swift.org/t/unlock-existential-types-for-all-protocols/40665)._
