On Wed, Mar 20, 2013 at 6:42 AM, Jan-Willem Maessen <jmaessen@alum.mit.edu> wrote:
On Wed, Mar 20, 2013 at 6:02 AM, Gábor Lehel <illissius@gmail.com> wrote:Compatibility issues aside, is there any reason newtypes aren't a good solution here?Well, the tricky bit is that there are really two distinct uses of hashing in the field in general and under discussion here in particular. The first (which is the one that's important for unordered-containers and almost all practical uses of hashing *within* a program) is to provide fast keys for hash tables, where the hash function is backed by equality checks and the like and is thus a question of performance rather than correctness. For this a reasonably good, but not necessarily cryptographically secure, hashing method is more than sufficient.