Carefully check all initial hash values in clj and cljs implementations

Description

Document what they are, and why they should be that way, and document the last version of the code it was carefully checked that all constructions of new Vector and/or Transient objects were consistent in how they initialized these fields.

For the clj implementation, since these fields are not final, and they are mutable, I believe that initializing them to any value other than 0 is not thread-safe, i.e. a thread other than the one that constructed the object could see the initial value of 0, even if the constructor assigns a different value like -1 to it. Find the commit to Clojure implementation code where the initial value was changed from -1 to 0, if I am remembering that was done, and if so, why it was done.

Environment

None

Status

Assignee

Andy Fingerhut

Reporter

Andy Fingerhut

Labels

None

Approval

None

Patch

None

Priority

Minor
Configure