Hacker News new | past | comments | ask | show | jobs | submit login

I think the intended reading of ”so don’t depend on hash values or order” is “do not have your code depend on hash values or iteration order of items sorted by hash value”.

So, what you shouldn’t do is:

- storing a hash value on disk, assuming it to be valid in a later run.

- assume that a hash map that has the same content as a hash map of a previous run has the same iteration order (not even if the calls used to construct them are 100% identical, and not even if both were constructed from the same literal).

I expect this was added to thwart DoS attacks (http://ocert.org/advisories/ocert-2011-003.html)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: