2015-04-20 6:03 GMT+02:00 Peter Taoussanis <[email protected]>:

> This got me wondering: is there an official contract somewhere describing
> hash behaviour similarities we _can_ safely depend on?
>

I don't think there is. IIRC clojurescript _has_ duplicated the recent work
to minimize collisions in collection hashing and I think that a ticket
unifying numeric hashes _might_ as well be accepted, if the performance
impact is not too high.
However, the only real requirement is that a hash equality in either CLJ or
CLJS implies a hash equality in the other. There is value in being able to
tweak the trade-off between performance, hash distribution and conformance
to the host platform, so I don't expect hash algorithms to be standardized.

When you want reproducability between runtimes, the right way (tm) is to
use cryptographic content-based hashing. See
https://github.com/ghubber/hasch for an implementation that might suit your
needs.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to