[Accepted] SE-0206: Hashable Enhancements

I'm glad Vincent and Karoy have put so much effort in here! I think other commenters are covering most serious issues much better than me, so I'll just add a usability note.

Without commenting on the deterministic hashing question…if the default behavior of init(seed:) is not going to be consistent from run to run, then it is not worth providing. As far as I can tell, it doesn't do anything different from just immediately calling hasher.combine(bits: seed.0); hasher.combine(bits: seed.1), right? Like, it might be a slightly faster implementation, but it's not really different as far as perturbing the initial state. Its presence would just add confusion for no real benefit.

/me doesn't really understand modern hash functions, though, so maybe this is not the case.

3 Likes