# \[Pitch\] One-Element Tuples

**URL:** <https://forums.swift.org/t/pitch-one-element-tuples/60219>\
**Category:** Pitches\
**Created:** [September 10, 2022, 2:56am UTC](https://forums.swift.org/t/pitch-one-element-tuples/60219 "2022-09-10T02:56:43Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![anon9791410](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@anon9791410](https://forums.swift.org/u/anon9791410)\
**Post date:** [September 11, 2022, 2:18am UTC](https://forums.swift.org/t/pitch-one-element-tuples/60219/28 "2022-09-11T02:18:24Z")

</div>

enums are a good place to focus—they're confusing in regards to this pitch and working through that will be helpful.

For example, they seem to do this:

> [@Slava\_Pestov](#):
>
> - An expression of type `(_: T)` does _not_ implicitly convert to a value of type `T` or vice versa.

…because these seem to be equivalent.

```swift
enum Enum<T> {
  case unlabeled(T)
  case labeledWithUnderscore(_: T)
  case tupleWithUnderscore((_: T))
}

```

* * *

> [@Slava\_Pestov](#):
>
> today the compiler does not allow them to be written or constructed

You can create them, but it can be painful to do so because we're not given access to their types.

> [@How do you get labeled associated values from Mirror children?](https://forums.swift.org/t/how-do-you-get-labeled-associated-values-from-mirror-children/36377):
>
> Every schoolchild knows that you Cannot create a single-element tuple with an element label. But this returns (label: ()).Type. How do we cast that?! ( Mirror( reflecting: Enum.labeled( label: () ) ).children.first?.value ).map(Mirror.init)?.subjectType You can dig into that [with another mirror](https://stackoverflow.com/a/61734859/652038). Can that be avoided? enum Enum { case unlabeled(Void) case tuple(label0: Void, label1: Void) case labeled(label: Void) func getAssociatedValue\<AssociatedValue\>(\_: AssociatedValue.Type)…

---

_[View the full topic](https://forums.swift.org/t/pitch-one-element-tuples/60219)._
