> Am 28.08.2016 um 05:34 schrieb Kevin Ballard via swift-evolution > <[email protected]>: > >> My biggest issue with Optional conforming to Comparable is that while a >> default implementation may sometimes be useful, it may not necessarily be >> the one you want. > > Isn't that true for almost everything?
That reminds me on a feature that has been discussed and added before: Making tuples conform to Comparable (https://github.com/apple/swift-evolution/blob/master/proposals/0015-tuple-comparison-operators.md <https://github.com/apple/swift-evolution/blob/master/proposals/0015-tuple-comparison-operators.md>) The implementation doesn't hurt me, but imho it's use is very limited as well. As for comparing optionals, my preferred result would be an Optional<Bool>: if (value < 5) ?? true {… It makes no assumptions on the order, is clear and also concise. Tino > There was a sketch of this posted to swift-evolution several weeks ago, but I > don’t have a link offhand. That, on the other hand, reminds me on the discussion about switching to another platform, because the mailing list sucks. I couldn't find a link to that one either (guess why ;-)
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
