That’s what conditional conformances are made for in my opinion. The generics 
manifesto shows an example of equatable tuples iff every type is also 
equatable. That said, one probably should be able to extend a specific set of 
tuples to arithmetic operations if there is a need for that in your own 
project. I’m not saying that the standard library should do that, but we should 
have that ability to do that at some point, iff we’ll have parametrized 
extensions and generic variadics.


 

-- 
Adrian Zubarev
Sent with Airmail

Am 3. März 2017 um 16:53:03, Stephen Canon ([email protected]) schrieb:

- vectors should (probably) have arithmetic operators. Tuples, even homogenous 
tuples, should (probably) not, because they may represent types for which 
arithmetic doesn’t make sense, or for which arithmetic might need to do 
different things per-lane.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to