Re: [swift-users] did i just imagine tuples were going to be hashable in swift 4?
On 07.07.2017 5:50, David Baraff via swift-users wrote: I thought I read that tuples would finally be hashable in swift 4, allowing for them to be used in dictionaries/sets, but now that i google for it, i find no mention of it. are there any plans? so often i just want to quickly create a dictionary set from a tuple of an integer or string or two, and not being able to do so is just plain annoying. Here what I can find regarding your question: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170313/033858.html --- quote --- ... > Btw, what is your opinion, can we expect (at some point of time) Equatable for tuples? > It is very handy to have Dictionary, type3> in C# and sad that we can't have [(type1,type2):type3] in Swift without declaration of new temporary struct type and implement Equatable for it. It would be reasonable, IMO, even before we support the full generalization of extensions on non-nominal types, to make tuples of Equatable/Hashable/Comparable elements conform to the same protocols by fiat. -Joe --- quote --- So... it seems like we all (including core team) want this, but this will not be implemented in Swift4, as I understand. ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users
Re: [swift-users] did i just imagine tuples were going to be hashable in swift 4?
Welcome to the group of people who thinks that the character from Monopoly had a monocle, including myself. You've just experienced a transdimensional jump from your universe without even notecing, but where Swift 4 actually had hashable tuples. :) Jokes aside, I haven't read anything about it in this universe, at least not for Swift 4. -- Adrian Zubarev Sent with Airmail Am 7. Juli 2017 um 04:40:55, David Baraff via swift-users (swift-users@swift.org(mailto:swift-users@swift.org)) schrieb: > > I thought I read that tuples would finally be hashable in swift 4, allowing > for them to be used in dictionaries/sets, but now that i google for it, i > find no mention of it. > > are there any plans? so often i just want to quickly create a dictionary set > from a tuple of an integer or string or two, and not being able to do so is > just plain annoying. > > ___ > swift-users mailing list > swift-users@swift.org > https://lists.swift.org/mailman/listinfo/swift-users ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users
[swift-users] did i just imagine tuples were going to be hashable in swift 4?
I thought I read that tuples would finally be hashable in swift 4, allowing for them to be used in dictionaries/sets, but now that i google for it, i find no mention of it. are there any plans? so often i just want to quickly create a dictionary set from a tuple of an integer or string or two, and not being able to do so is just plain annoying. ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users