Speaking of Lisp...

Lars T Hansen lth at acm.org
Sun Feb 4 06:51:01 PST 2007

On Feb 4, 2007, at 3:00 PM, Yuh-Ruey Chen wrote:

>> Another item falling out of the ES4 spec: hashes mapping string to
>> value where the mapping is not polluted by Object.prototype.  A late
>> "save" may be possible, if anyone can suggest syntax.  E.g., var hash
>> = #{'foo':1, 'bar':2, 'baz':3}; alert('toString' in hash) => false.
>> Eek, yet another attempt to use #.
> Would this new hashtable class derive from Object?

I think it could in principle, though it would violate the Object  
protocol the way we currently understand it (no toString / valueOf  
properties on the prototype object).  So we would have to finesse the  
use of those methods in the spec.


> If not, then in
> strict mode, would the following work (using #{} as the hashtable  
> syntax)?
> var x: Object = #{'foo':1};
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss

More information about the Es4-discuss mailing list