[swift-evolution] Synthesizing Equatable, Hashable, and Comparable for tuple types

Xiaodi Wu xiaodi.wu at gmail.com
Fri Nov 24 21:12:50 CST 2017

On Fri, Nov 24, 2017 at 9:08 PM, Mike Kluev via swift-evolution <
swift-evolution at swift.org> wrote:

> On 24 November 2017 at 23:47, Douglas Gregor <dgregor at apple.com> wrote:
>> e.g., making all tuples of Equatable elements Equatable
> that's already the case.. (all tuples of equatable elements are
> equatable). no?

No, tuples do not conform to any protocols. There are hardcoded
implementations of `==` up to some arity in the stdlib to partially
mitigate the lack of protocol conformance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171124/98f3f9e9/attachment.html>

More information about the swift-evolution mailing list