[swift-evolution] Synthesizing Equatable, Hashable, and Comparable for tuple types

Mike Kluev mike.kluev at gmail.com
Sat Nov 25 17:26:18 CST 2017


on Date: Wed, 22 Nov 2017 08:01:16 +0100 David Hart <david at hartbit.com>
wrote:

>
> What confuses me is that I always thought that T? was sugar for
> Optional<T> by design, and found that to be quite elegant.


ditto, i thought the same.


> But now you’re telling me that its just a hack to allow conformance on
> Optionals until it can be made structural. I would have thought that it
> would be cleaner to have specific concepts (optionals, tuples, etc…)
> represented in terms of more general concepts (enum, struct) so that the
> compiler had less to reason about. I’m just trying to understand :-)
>

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171125/93a8001b/attachment.html>


More information about the swift-evolution mailing list