<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=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 22. Nov 2017, at 07:51, Douglas Gregor via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div 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&nbsp;<a href="https://github.com/apple/swift/pull/12910" class="">bit of a debate</a>&nbsp;over the question of whether&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0143-conditional-conformances.md" class="">SE-0143 “Conditional Conformances”</a>&nbsp;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&nbsp;ContiguousArray: Equatable where Element: Equatable { /*== already exists */ }</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>extension&nbsp;Dictionary: Equatable where Value: Equatable { /*== already exists */ }</div></div><div class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>extension&nbsp;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:&nbsp;<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></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""><div class="">I think they’re supposed to be brought up separately. There are actually a few areas of the standard library that have become outdated as we accepted new language features without corresponding proposals about using them. For example, we have top-level SetIndex and DictionaryIndex typealiases and SetIterator and DictionaryIterator types; dinosaurs from the era before nested generics.</div><div class=""><br class=""></div><div class="">As for this proposal? +1. Obviously.</div><div class=""><br class=""></div><div class="">- Karl</div></body></html>