On 25 November 2017 at 23:07, Xiaodi Wu <xiaodi...@gmail.com> wrote: > Not sure what you’re asking. Equatable is a protocol. >
that's the point. i mean, if user writes this: extension (Equatable, Equatable) : Equatable what *else* could he mean other than this: extension <T: Equatable, R: Equatable> (T, R) : Equatable and if it is indeed the only reasonable meaning we can think of - i'd say the first notation is nicer. > For a protocol P, (P, P) is a concrete type with two elements each of > existential type P. > this part i do not understand. protocol is not an existential type. or is it? > For a type T : P, a tuple of type (T, T) is not a tuple of type (P, P). If > we can extend tuples, you can write a generic algorithm that works with any > type (T, T) where T : P, and/or you can write an algorithm that works with > concrete type (P, P). Note that there is no overlap between these two > because existential type P does not conform to protocol P. > > Mike
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution