> The justification for making Tuples comparable pretty much consists of 
> hand-waving.
> Why should (0,3,4) be smaller than (0,5,0)? Beats me.
> Why would it be the other way around? Also beats me.

I strongly agree that comparison for tuples makes little sense - but I'd choose 
a different example:
(0, 1) < (1, Any.self)
Both are tuples, they are not equal - but can you bring them into a natural 
order?
"Yeah, but those aren't tuple of the same type, of course you have to have 
exact same types for comparison"
Right, but when you want to use tuples of the same type in different places, 
wouldn't it be better to declare that type officially?

If tuple comparison comes for free: So be it — but I can't see any good use 
cases for this feature.
Of course, as Objective-C has no tuples, we don't have that much experience 
with them, but my expectation is that in most cases where order of tuples 
matters, it will depend on a single member — and there shouldn't be pressure to 
choose the order of the members just to get comparison for free.

Tino
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to