# Questions about the future of Protocols with Associated Types

**URL:** <https://forums.swift.org/t/questions-about-the-future-of-protocols-with-associated-types/14784>\
**Category:** Discussion\
**Created:** [July 26, 2018, 8:44pm UTC](https://forums.swift.org/t/questions-about-the-future-of-protocols-with-associated-types/14784 "2018-07-26T20:44:42Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![Dante-Broggi](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dante-broggi/32/7955_2.png) [@Dante-Broggi](https://forums.swift.org/u/Dante-Broggi)\
**Post date:** [July 27, 2018, 2:38pm UTC](https://forums.swift.org/t/questions-about-the-future-of-protocols-with-associated-types/14784/14 "2018-07-27T14:38:51Z")

</div>

In that other post, there is a problem with this section:

> [@Casting a type to a Protocol with Self requirements](https://forums.swift.org/t/casting-a-type-to-a-protocol-with-self-requirements/13708/17):
>
> protocol Bindable\<T\> {  
> // ...  
> func flatMap\<T\>(\_ transform: (Self.Element) throws -\> T?) rethrows -\> Output\<T\>  
> // ...  
> }

Because it should be more like:

```swift
protocol Bindable<T> {
  // …
  associatedtype Flattenable: Bindable = Self
  func flatMap(_ transform: (Self.Element) throws -> Flattenable) rethrows → Output<Flattenable.Element>
}

```

---

_[View the full topic](https://forums.swift.org/t/questions-about-the-future-of-protocols-with-associated-types/14784)._
