Tuples conform to Equatable, Comparable, and Hashable

Counterpoint: yes they do.

The supertype is (Int, Int), and the two subtypes do not add any stored properties, just some convenience accessors.

• • •

Regardless, as I mentioned here, I would prefer to make tuple labels have no type-system significance at all. If someone wants labels to affect type, then they should be using structs, not tuples. The labels of a tuple should exist purely for convenience.

2 Likes