[swift-evolution] Synthesizing Equatable, Hashable, and Comparable for tuple types
mike.kluev at gmail.com
Sat Nov 25 16:30:34 CST 2017
On 25 November 2017 at 16:04, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> The workaround substantially bloats the standard library, and the result
> is nothing close to the same because your type is still not Equatable. This
> means that it cannot benefit from any generic algorithms. For example, an
> array of such tuples cannot be Equatable in turn.
i see. then the current workaround is not deep enough.
> speaking of ugliness, the ellipsis on the left of names is quite ugly:
>> extension<...Elements : Equatable> (Elements...) : Equatable
> Seems perfectly fine to me.
i haven't encounter this notation before so it looks strange and requires
some effort to decipher. if it was e.g. in this form:
extension (Equatable...) : Equatable
then it would be immediately obvious what it means, IMHO
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution