# Extract Payload for enum cases having associated value

**URL:** <https://forums.swift.org/t/extract-payload-for-enum-cases-having-associated-value/27606>\
**Category:** Pitches\
**Tags:** enums, associatedvalue\
**Created:** [August 4, 2019, 4:16pm UTC](https://forums.swift.org/t/extract-payload-for-enum-cases-having-associated-value/27606 "2019-08-04T16:16:24Z")\
**Posts on this page:** 1\
**Showing post:** 229

<div class="post-metadata">

**Author:** ![xwu](https://avatars.discourse-cdn.com/v4/letter/x/b487fb/32.png) [@xwu](https://forums.swift.org/u/xwu)\
**Post date:** [September 1, 2019, 3:48pm UTC](https://forums.swift.org/t/extract-payload-for-enum-cases-having-associated-value/27606/229 "2019-09-01T15:48:51Z")

</div>

> [@gwendal.roue](#):
>
> So why not `(a: Int, b: String)` for the key path?

Because you can have `case foo(a: Int, a: Int, a: Int)` [but not](https://forums.swift.org/t/same-named-argument-and-tuple-labels/13757/12) `(a: Int, a: Int, a: Int)`. (This is, again, per the final state of affairs as proposed and approved, which still isn’t yet fully implemented.)

---

_[View the full topic](https://forums.swift.org/t/extract-payload-for-enum-cases-having-associated-value/27606)._
