<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 08 Mar 2016, at 03:25, Dmitri Gribenko via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">What does everyone think about requiring indices to conform to<br class="">Hashable, in addition to the existing requirements for Equatable and<br class="">Comparable?<br class=""></div></div></blockquote></div><br class=""><div class="">Why impose such a restriction?</div><div class=""><br class=""></div><div class="">I think it's better to just make any concrete index types (e.g. <font face="Menlo" class="">DictionaryIndex<K,V></font>) in the standard library <font face="Menlo" class="">Hashable</font> where possible. People are still free to constrain their algorithms to `<font face="Menlo" class="">C : CollectionType where C.Index : Hashable</font>` whenever needed.</div><div class=""><br class=""></div><div class="">Besides, in the proposed design, is it really necessary to make <font face="Menlo" class="">Index</font> also <font face="Menlo" class="">Comparable</font>, or wouldn't <font face="Menlo" class="">Equatable</font> be enough? Is it just a question of convenience and failing to find an example of and index type that's Equatable but not Comparable?</div><div class=""><br class=""></div><div class="">— Pyry</div></body></html>