Simple maps/sets: parameterize the comparator?

Axel Rauschmayer axel at
Thu Dec 29 15:53:51 PST 2011

>> 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.

+ Number.MAX_VALUE

This has the potential to be one of the most important parts of (whether as part of ECMA-262 or not).

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

I might be wrong about this, but: people reinvent different kinds of wheels in different programming languages. And collections don’t seem to appeal to the JS community.

>> 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

Makes sense. There might be some additional insights in what the Lispers are doing. This is more of a hunch than actual knowledge of mine – I simply like their way of thinking about object-orientation.

Dr. Axel Rauschmayer
axel at


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

More information about the es-discuss mailing list