Separating a Hash type from Object

Neil Mix nmix at
Sat May 5 14:40:42 PDT 2007

Has this thread dropped again?  That's too bad.  It seems like we  
keep going in this circle:

1) we need a base Dictionary class
2) in order to be successful, it needs "good UI" and perhaps weak refs
3) there's no syntax proposed for this
4) it's awfully late for any big changes anyway
5) but we need a Dictionary class

I take issue with #2.  It's my impression that the veteran JS  
developers on this list have all stated a strong desire for key-safe  
storage, and I believe that they would all agree that a Dictionary  
without syntactic sugar and weak refs is better than nothing at all.   
Do any JS hackers here disagree?

What is the danger in specifying a hobbled Dictionary class for now,  
with the hope that better syntactical goodness and weak refs can be  
added in a later version?

On May 2, 2007, at 3:13 PM, Brendan Eich wrote:

> On May 2, 2007, at 12:56 PM, P T Withington wrote:
>> Have you considered Hash being a new native type with its own rules
>> for ToPrimitive, ToString, and ToObject?
> We have considered a native Dictionary class, as I reported recently.
> It lacked sugar; it didn't support weak refs. We stepped back and
> deferred it.
> Because Dictioinary required users to call has, get and set methods,
> no changes to avoid bad shadowing of toString and valueOf arose with
> the proposal.
> /be
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at

More information about the Es4-discuss mailing list