# Pitch: Allow Protocols to be Nested in Non-Generic Contexts

**URL:** <https://forums.swift.org/t/pitch-allow-protocols-to-be-nested-in-non-generic-contexts/65285>\
**Category:** Pitches\
**Created:** [May 31, 2023, 6:16pm UTC](https://forums.swift.org/t/pitch-allow-protocols-to-be-nested-in-non-generic-contexts/65285 "2023-05-31T18:16:05Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://forums.swift.org/u/Karl)\
**Post date:** [July 23, 2023, 5:19pm UTC](https://forums.swift.org/t/pitch-allow-protocols-to-be-nested-in-non-generic-contexts/65285/28 "2023-07-23T17:19:09Z")

</div>

Apologies for not responding to this before. I agree that a nested protocol should not satisfy an associated type requirement.

Especially with the loss of bare protocol existential syntax, the language is moving towards putting a clearer distinction between protocols (i.e. _constraints_) and concrete types. `associatedtype` is currently used to refer to concrete types, and it would be problematic in a lot of senses for it to bind to a nested protocol.

There have been requests in the past for "associated protocols" or something broadly to that effect:

- [Protocols with associated protocols?](https://forums.swift.org/t/protocols-with-associated-protocols/17022)
- [Support for protocols as parameters for constrained generics](https://forums.swift.org/t/support-for-protocols-as-parameters-for-constrained-generics/10009)
- [Generalized supertype constraints](https://forums.swift.org/t/generalized-supertype-constraints/22380)

If we ever did add some kind of associated protocol feature, it might be reasonable to use nested protocols to define them, as we currently can with associated types and nested concrete types.

---

_[View the full topic](https://forums.swift.org/t/pitch-allow-protocols-to-be-nested-in-non-generic-contexts/65285)._
