<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Mar 13, 2017 at 1:43 PM David Hart &lt;<a href="mailto:david@hartbit.com">david@hartbit.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On 13 Mar 2017, at 20:51, Tony Allevato &lt;<a href="mailto:tony.allevato@gmail.com" class="gmail_msg" target="_blank">tony.allevato@gmail.com</a>&gt; wrote:</div><br class="m_-5799815253395465265Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">I&#39;m not convinced this is the right approach: it couples the fact that a type is hashable with a specific strategy for implementing the hash value computation. </div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">I’m confused. This proposal specifically <b class="gmail_msg">decouples</b> the implementation of hashable from hashing strategies: that’s its main goal. Could you explain how you see coupling here?</div></div></div></blockquote><div><br></div><div>Hashable as it is currently defined says &quot;this type provides a hashValue property that allows it to be used in a hashing container&quot;. The proposed API says &quot;this type is hashable using a specific visitor API and hasher interface&quot;. The &quot;visitor API and hasher interface&quot; is what I mean by &quot;strategy&quot; in my original message, compared to the current Hashable which simply says &quot;it&#39;s hashable and here&#39;s its hash—a number&quot;.</div><div><br></div><div>I don&#39;t buy the argument that we need to support the same type to support being hashed with arbitrary hashing algorithms at runtime. Hash values in languages like Swift are intended to be used specifically for hashing collections. What value for that use case is provided by allowing a collection to plug in various algorithms for the same type? I don&#39;t think the added flexibility pays for the increased complexity.</div><div><br></div><div>A simpler solution to increase safety/force people to consider the resiliency of their hash function would just be to have Hashable.hashValue return a concrete &quot;HashValue&quot; type that provides the mixing interface, with a concrete implementation in the standard library—but I think a simple interface that allows mixing (1) integer constants and (2) hash values of other Hashables would be more sufficient and easier to understand. If users need something more complex than that, then it stands to reason that they *should* have to do a little more work.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">Instead, the language should make efforts to avoid requiring the user to think about hashing algorithms *at all*; to answer Sean&#39;s question a couple messages up, I&#39;ve <a href="https://gist.github.com/allevato/2fd10290bfa84accfbe977d8ac07daad" class="gmail_msg" target="_blank">proposed in the past</a> (rough working draft) adding derivation of Equatable and Hashable for structs and enums where it&#39;s possible to automatically do so (for example, if all of the enum&#39;s associated values are Equatable/Hashable).</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">This proposal does so with the <b class="gmail_msg">ContinuouslyHashable</b> protocol, which provides a default implementation of hashable that works for enums and structs that have “inclusive” memory layouts. I think this is good thing, because it means you have to make a conscious choice to use <b class="gmail_msg">ContinuouslyHashable</b> instead of relying on an automatic implementation which will sometimes be wrong.</div></div></div></blockquote><div><br></div><div>From what I can tell, ContiguouslyHashable only works with fixed layout types, whereas a derived implementation would work for anything that is composed entirely of other Hashable types by mixing the hash values of those components in a known way.</div><div><br></div><div>In such a situation, why do you expect that such an automatically generated implementation would be &quot;wrong&quot;?</div><div> <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">I&#39;ve been experimenting with an implementation in the compiler and I have something that works for enums, except for recursive ones. I haven&#39;t started structs yet because I think there are more open questions there, and I hope to propose enums and structs independently so that the enum one doesn&#39;t get bogged down by the struct one.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">The core team seems to be aware of the need for this; the logic that derives Equatable/Hashable for enums without associated values also has TODO comments to handle those with associated values, and to handle structs as well. Slava Pestov mentioned a while back that they encouraged PRs on it, which is why I started, but my free time has been limited lately.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">That being said, I *do* think there would be value in having some kind of hash &quot;mixer&quot; as part of the standard library and strongly encouraging through documentation that hashValue implementors use it. Getting the function right is the hard part, and if Swift both (1) took care of it for you by default in many cases and (2) made the harder cases easier by providing a high quality canned implementation, I think we&#39;d have a much cleaner solution than what is being proposed here.</div><div class="gmail_msg"><br class="gmail_msg"></div></div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Mon, Mar 13, 2017 at 12:18 PM Sean Heber via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there any reason the API couldn’t be expressed as something along these lines?<br class="gmail_msg">
<br class="gmail_msg">
func hash() -&gt; [Hashable] {<br class="gmail_msg">
  return [x, y]<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
l8r<br class="gmail_msg">
Sean<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
&gt; On Mar 13, 2017, at 2:15 PM, David Hart &lt;<a href="mailto:david@hartbit.com" class="gmail_msg" target="_blank">david@hartbit.com</a>&gt; wrote:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; On 13 Mar 2017, at 18:54, Sean Heber via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; I’m dumb when it comes to proper hashing, but it’s such a tediously common thing in my experience to need to add Hashable to some kind of a struct so I can stash it in a set or use it as a dictionary key. Is there really no way to make this all more automatic? I have to be honest - this proposal seems *harder* to understand than the way it works now.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; It&#39;s not really harder: just call hash on each of your type&#39;s significant values:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; x.hash(&amp;hasher)<br class="gmail_msg">
&gt; y.hash(&amp;hasher)<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; How would you implement hashValue in a simpler way, remembering that &#39;x ^ y&#39; is an incorrect implementation?<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;&gt; Of course the easiest would be if the language could just do this “good enough&quot; for me using reflection or whatever and if I really did run into a problem where I wanted to do this myself, I could override something.<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; Perfect is the enemy of good.<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; l8r<br class="gmail_msg">
&gt;&gt; Sean<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; On Mar 13, 2017, at 10:38 AM, Vincent Esche via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Hi there,<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; I&#39;ve written up a proposal for an overhaul/replacement of the Hashable protocol and would love to hear your feedback on it!<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Rendered | Blog Post<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Cheers,<br class="gmail_msg">
&gt;&gt;&gt; Vincent<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Ps: I&#39;d like to thank David Hart (@hartbit) for his great editorial feedback on this proposal. 👍<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; HashVisitable<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;   • Proposal: SE-NNNN<br class="gmail_msg">
&gt;&gt;&gt;   • Authors: Vincent Esche<br class="gmail_msg">
&gt;&gt;&gt;   • Review Manager: TBD<br class="gmail_msg">
&gt;&gt;&gt;   • Status: Awaiting review<br class="gmail_msg">
&gt;&gt;&gt; Introduction<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Replace the Hashable protocol by two new procotols (Hasher and HashVisitable) to improve safety, versatility and learnability.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Motivation<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Implementing Hashable is difficult and the consequences if not done well have dire performance and safety repercussions.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; The documentation of Hashable lists a sample implementation of var hashValue:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; /// A point in an x-y coordinate system.<br class="gmail_msg">
&gt;&gt;&gt; struct GridPoint {<br class="gmail_msg">
&gt;&gt;&gt;   var x: Int<br class="gmail_msg">
&gt;&gt;&gt;   var y: Int<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; extension GridPoint: Hashable {<br class="gmail_msg">
&gt;&gt;&gt;   var hashValue: Int {<br class="gmail_msg">
&gt;&gt;&gt;       return x.hashValue ^ y.hashValue<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;   static func == (lhs: GridPoint, rhs: GridPoint) -&gt; Bool {<br class="gmail_msg">
&gt;&gt;&gt;       return lhs.x == rhs.x &amp;&amp; lhs.y == rhs.y<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Calculating the hashes of all GridPoints (given the above implementation) on a 1000 × 1000 grid …<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; let (width, height) = (1000, 1000)<br class="gmail_msg">
&gt;&gt;&gt; let total = width * height<br class="gmail_msg">
&gt;&gt;&gt; var hashes = Set&lt;Int&gt;()<br class="gmail_msg">
&gt;&gt;&gt; for x in 0..&lt;width {<br class="gmail_msg">
&gt;&gt;&gt;   for y in 0..&lt;height {<br class="gmail_msg">
&gt;&gt;&gt;       hashes.insert(GridPoint(x: x, y: y).hashValue)<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt; print(&quot;\(hashes.count) unique hashes out of a total of \(total).&quot;)<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; … results in just 1024 unique hash values for 1_000_000 unique values.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; In other words: The recommended implementation causes 99.9% of values to trigger a hash collision.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Out of those 1_000_000 values the median collision count was 976 with min and max being 976 and 1000respectively.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; The collision rate will have negative impact in algorithms which heavily use hashValue like the ones in Dictionaryand Set. Furthermore, it increases the vulnerability to DDOS attacks when exposed to the web.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; If even the official Swift documentation gets the implementation of hashValue wrong, then who is to expect the average Swift programmer to do any better?<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; In contrast, running the same snippet using HashVisitable and the semi-secure Fnv1aHash (see below) results in zero collisions!<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Finally, the design of the Hashable protocol forces the use of one implementation without the possibility of switching between multiple hashing algorithms.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Proposed solution<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Instead of coupling the hashing algorithm with each and every Swift type, we should provide a hashing API based on the visitor-pattern. By freeing application developers from the burden of having to implement hashing algorithms, the Standard Library can provide default ones which fulfill collision, performance and security goals. Furthermore, it would allow developers to swap to different algorithms based on the use case.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Detailed design<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; The proposal deprecates the Hashable protocol and introduces the following two:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; protocol Hasher<br class="gmail_msg">
&gt;&gt;&gt; {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; mutating func finish() -&gt; Int<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; mutating func write(bytes<br class="gmail_msg">
&gt;&gt;&gt; : UnsafeRawBufferPointer)<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; protocol HashVisitable<br class="gmail_msg">
&gt;&gt;&gt; {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; func hash&lt;H: Hasher&gt;(_ hasher: inout<br class="gmail_msg">
&gt;&gt;&gt; H)<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Hasher is the protocol which represents a hashing algorithm, and HashVisitable replaces Hashable. For types entirely represented by their memory layout, the following protocol would provide a default implementation:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; protocol ContiguouslyHashable: HashVisitable {}<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; extension ContiguouslyHashable {<br class="gmail_msg">
&gt;&gt;&gt;   func hash&lt;H: Hasher&gt;(_ hasher: inout H) {<br class="gmail_msg">
&gt;&gt;&gt;       var mutableSelf = self<br class="gmail_msg">
&gt;&gt;&gt;       try! Swift.withUnsafeBytes(of: &amp;mutableSelf) {<br class="gmail_msg">
&gt;&gt;&gt;           hasher.write(bytes: $0)<br class="gmail_msg">
&gt;&gt;&gt;       }<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; extension Bool : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension UInt8 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension UInt16 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension UInt32 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension UInt64 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension UInt : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension Int8 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension Int16 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension Int32 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension Int64 : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt; extension Int : ContiguouslyHashable {}<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; The Standard-Library would then provide a set of hashing implementations specific to each purpose. A possible choice for hashing algorithms would be the reasonably fast SipHash-2-4, and the reasonably secure SipHash-4-8.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; FNV-1A is another popular semi-secure but blazingly fast hash algorithm, which – for the sake of demonstration – could be implemented as follows:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; struct Fnv1aHash<br class="gmail_msg">
&gt;&gt;&gt; {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; fileprivate var state: UInt<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; init(seed: UInt<br class="gmail_msg">
&gt;&gt;&gt; ) {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; self.state = seed &amp;+ 14695981039346656037<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; extension Fnv1aHash: Hasher<br class="gmail_msg">
&gt;&gt;&gt; {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; mutating func write(bytes<br class="gmail_msg">
&gt;&gt;&gt; : UnsafeRawBufferPointer) {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; for byte in<br class="gmail_msg">
&gt;&gt;&gt; bytes {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; self.state = (self.state ^ UInt(byte)) &amp;* 1099511628211<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt;       }<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; mutating func finish() -&gt; Int<br class="gmail_msg">
&gt;&gt;&gt; {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; return unsafeBitCast(self.state, to: Int.self<br class="gmail_msg">
&gt;&gt;&gt; )<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Coming back to the sample code present in the Hashable documentation, the new implementation would look like:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; extension GridPoint: HashVisitable<br class="gmail_msg">
&gt;&gt;&gt; {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; func hash&lt;H: Hasher&gt;(_ hasher: inout<br class="gmail_msg">
&gt;&gt;&gt; H) {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; self.x.hash(&amp;<br class="gmail_msg">
&gt;&gt;&gt; hasher)<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; self.y.hash(&amp;<br class="gmail_msg">
&gt;&gt;&gt; hasher)<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Source compatibility<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Making use of &quot;extending protocols to conform to protocols&quot;:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; extension Hashable: HashVisitable<br class="gmail_msg">
&gt;&gt;&gt; {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; func hash&lt;H: Hasher&gt;(_ hasher: inout<br class="gmail_msg">
&gt;&gt;&gt; H) {<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; self.hashValue.hash(&amp;<br class="gmail_msg">
&gt;&gt;&gt; hasher)<br class="gmail_msg">
&gt;&gt;&gt;   }<br class="gmail_msg">
&gt;&gt;&gt; }<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Effect on ABI stability<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; n/a<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Effect on API resilience<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; This feature should be possible to add/remove without breaking ABI.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Alternatives considered<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; n/a<br class="gmail_msg">
&gt;&gt;&gt; _______________________________________________<br class="gmail_msg">
&gt;&gt;&gt; swift-evolution mailing list<br class="gmail_msg">
&gt;&gt;&gt; <a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
&gt;&gt;&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; _______________________________________________<br class="gmail_msg">
&gt;&gt; swift-evolution mailing list<br class="gmail_msg">
&gt;&gt; <a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
&gt;&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div>
</div></blockquote></div></div></blockquote></div></div>