Speaking of Lisp...

Brendan Eich brendan at mozilla.org
Fri Jan 5 17:14:13 PST 2007


On Jan 5, 2007, at 5:01 PM, Jeff Thompson wrote:

> Since Firefox 2.0, they fixed the following bug, so that == on two  
> strings instantly checks
> for two identical string objects.
> https://bugzilla.mozilla.org/show_bug.cgi?id=314890

That's just an optimization, since == is defined to compute true for  
any two strings with the same ordered list of characters.

ECMA TG1 has not considered symbols.  Macros and property quotation  
facilities have been mentioned for post-ES4 work, so who knows?

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

(Should these map value to value, rather than string to value?  E4X  
(ECMA 357) already introduced QName objects as identifiers, so one  
can't pretend all properties are named by strings, if one believes in  
E4X.)

/be



More information about the Es4-discuss mailing list