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

Chris Lattner clattner at nondot.org
Tue Nov 21 13:29:23 CST 2017

> On Nov 21, 2017, at 9:06 AM, David Hart <david at hartbit.com> wrote:
>>> On 21 Nov 2017, at 03:17, Chris Lattner via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>> Yes, I agree, we need variadic generics before we can have tuples conform :-(
>>>> At the end of the day, you want to be able to treat “(U, V, W)” as sugar for Tuple<U,V,W> just like we handle array sugar.  When that is possible, Tuple is just a type like any other in the system (but we need variadics to express it).
>>> Eye-opening! Now I understand how important variadic generics are. Somebody should add that example to the Generics Manifesto. Questions:
>>> • Doesn’t this simplification of the type system hoist Variadic Generics back up the list of priorities?
>> Not above conditional and recursive conformances.
> Correct. But recursive conformances are implemented and conditional conformances are on the way. To rephrase my question: doesn't this simplification of the type system hoist Variadic Generics to be the next big priority after conditional conformances are finished?

I don’t know what the answer to your question is, nor do I know what the current list of priorities are.  :-)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171121/580584cc/attachment.html>

More information about the swift-evolution mailing list