[plt-scheme] prop:equal+hash for scheme/class ?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Dec 27 22:16:27 EST 2008

At Sat, 27 Dec 2008 18:13:58 -0500, Felix Klock's PLT scheme proxy wrote:
> Is there a prop:equal+hash for the scheme/class collection?

Not currently.

> Or perhaps instead of a property, there are a set of methods I am  
> supposed to override?  (Much like how in Java one is supposed to make  
> sure that the hashCode() and equals(..) methods must be kept in  
> sync.)  But if that is the case, the methods are not documented as far  
> as I can tell.
> The documentation for object% says that it "has no methods  
> fields" (sic) which leads me to think that PLT did not follow Java's  
> lead (that's good!) and so something more like prop:equal+hash (which  
> feels more like multi-method dispatch) is what belongs here.

It would be easy to add an interface for `prop:equal+hash' along the
same lines as the `printable<%>' interface for `prop:custom-write'. I'm
open to other suggestions.


Posted on the users mailing list.