[swift-evolution] Synthesizing Equatable, Hashable, and Comparable for tuple types
Tino Heth
2th at gmx.de
Tue Nov 28 04:27:24 CST 2017
I think this thread derailed quite a bit — it might have even been a good thing that some discussion accidentally went off-list ;-)
Personally, I think it's nice if tuples and structs would converge more, so that either struct is seen as an extension of the tuple-concept, or tuple is considered to be an (restricted) anonymous struct.
E.g.
struct StructPoint {
let x: Float
let y: Float
}
typealias TuplePoint = (x: Float, y: Float)
would more or less have the same abilities (allowing extensions and protocol-conformance).
Constructors for tuples would afaics be easy, and maybe it would even be possible to initialize some structs from tuple-literals.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171128/79320571/attachment.html>
More information about the swift-evolution
mailing list