On Sat, Nov 25, 2017 at 4:30 PM, Mike Kluev <mike.kl...@gmail.com> wrote:
> On 25 November 2017 at 16:04, Xiaodi Wu <xiaodi...@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 > That reads to me like you are extending a tuple of type `(Equatable...)`. This is not the same as extending a tuple of type `(E...) where ...E : Equatable`.
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution