Simple maps/sets: parameterize the comparator?

Allen Wirfs-Brock allen at
Thu Dec 29 10:04:19 PST 2011

On Dec 29, 2011, at 6:34 AM, Axel Rauschmayer wrote:

>> We should probably avoid pressures for the build-ins to cover all possible use cases. In we will should have all the primitives necessary for JS programmers to define their own efficient collection objects, including various kinds of hash-tables.  Hopefully some good libraries of such will get written.
>> I take it you are simply reiterating the desire for a standard system provided high entropy object-identity hash that is guaranteed to correspond to === and is.
> I’m curious: Is it likely that such libraries will get written by the community? This domain does not seem to enjoy much interest. (I would volunteer, but have neither the necessary expertise/experience nor the time.)

Well, If nobody else creates such a library, I will.

I think up to now, JS has not been particularly hospitable to collection libraries, but this will be different in

> Can we profit from prior work? The following comes to mind:
> - “User-extensible sequences in Common Lisp”, Christophe Rhodes
> - Programming languages with collection APIs (among many others): Smalltalk, Java

See my experiments with Smalltalk-80 collections in at .  However, if I was actually going to use Smalltalk collections as a model I would start with the ANSI Smalltalk collection specification section 5.7

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list