# SE-0280: Enum cases as protocol witnesses

**URL:** <https://forums.swift.org/t/se-0280-enum-cases-as-protocol-witnesses/34257>\
**Category:** Proposal Reviews\
**Created:** [March 3, 2020, 5:57am UTC](https://forums.swift.org/t/se-0280-enum-cases-as-protocol-witnesses/34257 "2020-03-03T05:57:06Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![owenv](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/owenv/32/6137_2.png) [@owenv](https://forums.swift.org/u/owenv)\
**Post date:** [March 3, 2020, 9:59pm UTC](https://forums.swift.org/t/se-0280-enum-cases-as-protocol-witnesses/34257/15 "2020-03-03T21:59:06Z")

</div>

> [@John\_McCall](#):
>
> What is your evaluation of the proposal?

+1, this is a straightforward addition which makes witness matching focused less on exact syntax and more on the semantics of a declaration.

> [@John\_McCall](#):
>
> Is the problem being addressed significant enough to warrant a change to Swift?

Yes, the existing restrictions which disallow this are due to implementation limitations rather than deliberate design decisions IMO. This change will allow enums to conform to some protocols in a more natural manner.

> [@John\_McCall](#):
>
> Does this proposal fit well with the feel and direction of Swift?

Yes. More generally, I think this fits well with the goals of the author's witness matching manifesto in that it loosens syntactic matching requirements and focuses on what makes sense and is practically useful from a semantic perspective.

> [@John\_McCall](#):
>
> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

I followed the pitch and the progress of the witness matching manifesto.

* * *

With regard to the resilience issues brought up by @jrose, I don't think the inability to switch between satisfying a requirement with an enum case and other static members should block this proposal. A similar issue came up during the review of SE-0267 (where clauses on contextually generic declarations) where writing equivalent declarations with different syntax results in mangling differences, and it's likely parameterized extensions will run into similar issues. In comparison to those two features, I think it's intuitively clearer that enum cases and static vars have different ABI.

---

_[View the full topic](https://forums.swift.org/t/se-0280-enum-cases-as-protocol-witnesses/34257)._
