<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">We’re having a <a href="https://github.com/apple/swift/pull/12910" class="">bit of a debate</a> over the question of whether <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0143-conditional-conformances.md" class="">SE-0143 “Conditional Conformances”</a> actually proposes any standard library changes at all, or whether they should all be brought up separately. So, I’ll pitch the pieces that I’d love to put into 4.1 to see if they’re as obvious as I think they should be :)</div><div class=""><br class=""></div><div class="">Proposal: make Optional, Array, ArraySlice, ContiguousArray, and Dictionary conform to Equatable when their type parameters are Equatable (and Set always conform to Equatable). Specifically, add to the standard library:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>extension Optional: Equatable where Wrapped: Equatable { /*== already exists */ }</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>extension Array: Equatable where Element: Equatable { /*== already exists */ }</div><div class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>extension ArraySlice: Equatable where Element: Equatable { /*== already exists */ }</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>extension ContiguousArray: Equatable where Element: Equatable { /*== already exists */ }</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>extension Dictionary: Equatable where Value: Equatable { /*== already exists */ }</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>extension Set: Equatable { /*== already exists */ }</div></div><div class=""><br class=""></div><div class="">Motivation: we need these for ==/!= to properly compose. It’s a highly-requested feature and an obvious “first use” of conditional conformances for the standard library that is unlikely to break any code.</div><div class=""><br class=""></div><div class="">Implementation: <a href="https://github.com/apple/swift/pull/13046" class="">https://github.com/apple/swift/pull/13046</a></div><div class=""><br class=""></div><div class="">Thoughts?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div class=""><br class=""></div></body></html>