[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Seeking review of sets and hash tables proposals



Ray Dillinger scripsit:

> I don't think that's the issue Vassil was talking about, but
> implementation as a map requires the ability to use a custom
> hash function if using a custom equality predicate.

Which, come to think of it, is a good argument for the
hash-plus-equivalence magic.  The current set/bag API doesn't have any
way to specify a hash function, because the fact that sets and bags use
a hash table is or should be an implementation detail -- but if you pass
an unknown equivalence function, the implementation won't work.

Granted that perhaps a record would be better than a magic procedure
here, nevertheless it does begin to look like some method of packaging
hash function with equivalence predicate is necessary for cleanness.

-- 
John Cowan            http://www.ccil.org/~cowan     cowan@x
                if if = then then then = else else else = if;

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports