<div dir="ltr">Looks good to me, though I have some clarifying questions. For a type which conforms to both Equatable and Hashable:<div><br></div><div>1. To automatically derive both Equatable and Hashable, will it be sufficient to declare “struct Foo: Hashable” (since Hashable refines Equatable) or must “Equatable” also be listed?</div><div><br></div><div>2. Will it be possible to automatically derive “==” while manually implementing “hashValue”?</div><div><div>2a. If so, will “Equatable” and “Hashable” both need to appear in the declaration, or will “Hashable” alone suffice?<br></div><div><br></div><div>3. Will it be possible to automatically derive “hashValue” while manually implementing “==”?<div>3a. If so, will “Equatable” and “Hashable” both need to appear in the declaration, or will “Hashable” alone suffice?</div><div><br></div></div></div><div>Thanks,</div><div><br></div><div>Nevin</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 9, 2017 at 11:36 AM, Tony Allevato via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Now that Swift 5 is taking proposals, I'm dusting off my proposal to synthesize Equatable/Hashable conformance for enums and structs. I had implemented this a few months ago hoping to squeeze it in by the Swift 4 deadline, but unfortunately the timeline was too tight.<br></div><div><br></div><div>The pull request for the proposal is here: <a href="https://github.com/apple/swift-evolution/pull/706" target="_blank">https://github.com/<wbr>apple/swift-evolution/pull/706</a><wbr>. (Direct link to proposal text: <a href="https://github.com/allevato/swift-evolution/blob/b3dcffc2e6f74e17eba05a6eb7eb29ad58bf36a3/proposals/NNNN-synthesize-equatable-hashable.md" target="_blank">https://github.com/allevato/<wbr>swift-evolution/blob/<wbr>b3dcffc2e6f74e17eba05a6eb7eb29<wbr>ad58bf36a3/proposals/NNNN-<wbr>synthesize-equatable-hashable.<wbr>md</a>)</div><div><br></div><div>The pull request for the implementation (rebased last night) is here: <a href="https://github.com/apple/swift/pull/9619" target="_blank">https://github.com/<wbr>apple/swift/pull/9619</a></div><div><br></div><div>Thanks all!</div><div><br></div></div>
<br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div>