Re: must SRFI-128 mustard be taken seriously? John Cowan 09 May 2016 22:08 UTC

William D Clinger scripsit:

> [If you get this message twice, I apologize.  I think I sent
> it to the wrong mailing list six days ago.]

I did not see it before.

> so h0 must be a fixed point of f1.  In like manner, all of the hash
> values that can be computed for all other circular structures would
> have to be fixed points of f1.

I follow your reasoning up to the last point.  I think the requirements
are satisfied if hashing a vector with one element produces the same hash
value as the element.  Is this extraordinarily expensive?  The intention
is simply to assure that the hash of an object containing more than one
element depends on the hashes of the elements.

> Can anyone even conceive of writing a program that wouldn't work if
> default-hash and SRFI 126 equal-hash were the same procedure?

It seems to me that the chief difference is that default-hash must respect
any registered comparators, whereas equal-hash has implementation-defined
behavior when applied to records or other non-standard Scheme objects.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
Is not a patron, my Lord [Chesterfield], one who looks with unconcern
on a man struggling for life in the water, and when he has reached ground
encumbers him with help?        --Samuel Johnson