# Protocols are in better shape than concrete types now

**URL:** <https://forums.swift.org/t/protocols-are-in-better-shape-than-concrete-types-now/58085>\
**Category:** Using Swift\
**Created:** [June 13, 2022, 4:17pm UTC](https://forums.swift.org/t/protocols-are-in-better-shape-than-concrete-types-now/58085 "2022-06-13T16:17:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gwendal.roue](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gwendal.roue/32/13992_2.png) [@gwendal.roue](https://forums.swift.org/u/gwendal.roue)\
**Post date:** [June 13, 2022, 4:17pm UTC](https://forums.swift.org/t/protocols-are-in-better-shape-than-concrete-types-now/58085/1 "2022-06-13T16:17:33Z")

</div>

Swift 5.7, the good, and...

```swift
// 🎉 Sooo good
extension Collection<String> { ... }

// 😭 Constrained extension must be declared on the unspecialized
// generic type 'Set' with constraints specified by a 'where' clause
extension Set<String> { ... }

```

For concrete types, the code that is accepted by the compiler is much less nice than the constrained protocol extension:

```swift
extension Set where Element == String { }

```

The lack of symmetry is really not beautiful. Developers _also_ need to extend concrete generic types, not only protocols!

Is it something that is already planned? Or is it worth being filed as an enhancement request? Or would we need a proper evolution process?

---

<div class="post-metadata">

**Author:** ![jjatie](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jjatie/32/24428_2.png) [@jjatie](https://forums.swift.org/u/jjatie)\
**Post date:** [June 13, 2022, 4:20pm UTC](https://forums.swift.org/t/protocols-are-in-better-shape-than-concrete-types-now/58085/2 "2022-06-13T16:20:53Z")

</div>

[https://forums.swift.org/t/pitch-extensions-on-bound-generic-types/](https://forums.swift.org/t/pitch-extensions-on-bound-generic-types/)

---

<div class="post-metadata">

**Author:** ![gwendal.roue](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gwendal.roue/32/13992_2.png) [@gwendal.roue](https://forums.swift.org/u/gwendal.roue)\
**Post date:** [June 13, 2022, 4:22pm UTC](https://forums.swift.org/t/protocols-are-in-better-shape-than-concrete-types-now/58085/3 "2022-06-13T16:22:56Z")

</div>

Thank you! Apologies for the noise!
