Comment by paulvrutledge

Comment by paulvrutledge 4 days ago

1 reply

I suspect you're right and was already having similar thoughts regarding the hashing scheme. I put a patch together and am going to supplement with some additional tests of the collision space.

Unordered hashes made more sense for arbitrary Clojure data structures where the keys might be complex compound objects, but once we're in the land of datoms with finite value data types it's pretty easy to enforce a consistent ordering.

(disclaimer: I wrote much of the feature and post)

limit499karma 4 days ago

> where the keys might be complex compound objects

Given that any (simple) object has a unique c.a. identity, even anonymous (and unordered) containment in the parent object provides a key, that is k->k, with implicit order over {K} in the domain of keys (say ascending sort on k0..kn). As you obviously know, there are various schemas for that, such as "objspace://oid/<value-hash>". By definition, that is a bounded domain, with the same cardinality as the hash space. So then there remains the matter of nesting (aka trees) in which case unique identity of the parent is recursively computed as we walk up the tree from the leaves.