# Protocol Conformance for Tuples / Anonymous Structs

**URL:** <https://forums.swift.org/t/protocol-conformance-for-tuples-anonymous-structs/24207>\
**Category:** Pitches\
**Tags:** protocols, tuple\
**Created:** [May 6, 2019, 3:52pm UTC](https://forums.swift.org/t/protocol-conformance-for-tuples-anonymous-structs/24207 "2019-05-06T15:52:51Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![taylorswift](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/taylorswift/32/43413_2.png) [@taylorswift](https://forums.swift.org/u/taylorswift)\
**Post date:** [May 21, 2019, 3:42am UTC](https://forums.swift.org/t/protocol-conformance-for-tuples-anonymous-structs/24207/10 "2019-05-21T03:42:40Z")

</div>

> [@GetSwifty](#):
>
> More generally it seems like people are looking for some sort of Type system in between tuples and structs. Something that can adhere to protocols but feels as simple to use as a Tuple.

this is getting to the actual root of the problem. i’ve felt for a while now that when people ask for tuple conformances, what they really want is to define a struct but use _the tuple syntax_ to express it, since tuples in swift are really pretty feature-poor (no splats!) so there’s only two possible reasons you’d want to use one:

- you want the `()` syntax (“why do i have to spell my `Point3D` with `.init()`?”)
- you’re too lazy to define a named type (“why do i have to define a struct when all i want is a dictionary key pair?”)

with the exception of the big three `Hashable`, `Comparable`, and `Codable`, my guess is if you care enough to want your tuple to conform to something, then (2) doesn’t really apply, so maybe `ExpressibleByTupleLiteral` ([1](https://forums.swift.org/t/implementing-expressiblebytupleliteral-how-hard/21169), [2](https://forums.swift.org/t/making-tuples-more-useful-with-expressiblebytupleliteral/11248), [3](https://forums.swift.org/t/expressiblebytupleliteral/14293)) combined with magic [EHC+`Codable`](https://forums.swift.org/t/synthesizing-equatable-hashable-and-comparable-for-tuple-types/7111) would solve the problem.

---

_[View the full topic](https://forums.swift.org/t/protocol-conformance-for-tuples-anonymous-structs/24207)._
