==, ===, and Name/Namspace (was: RE: ES4 draft: Name)

Brendan Eich brendan at mozilla.org
Thu Mar 13 15:57:54 PDT 2008


On Mar 13, 2008, at 3:39 PM, Lars Hansen wrote:

> Firefox currently has that "new Namespace" (for E4X) produces
> a new object that is == to another namespace produced with the
> same string but not ===.  From looking at the code, ActionScript3
> does the same thing.  Ditto for names (QName in E4X, not Name).

All per ECMA-357, the E4X spec.

> But in Firefox, Namespace is dynamic (not so in ActionScript) so
> == but not === makes sense; if Namespace is not dynamic in ES4
> we can get away with the changed behavior.  Still, might pose
> a backward compatibility risk.  On the third hand, E4X is not
> used on the web in general, only in apps targeted to FF and AS3.

This is a non-issue, AFAIK. See my earlier post on E4X.

No interoperable web content uses E4X, and the Firefox-hosted E4X  
implementation could be versioned to support the old way, in the  
worst-case -- if there were significant Firefox-only content whose  
owners were unwilling or unable to upgrade their code.

I doubt that any such code exists, but the approach I would favor,  
given an incompatible but better ES4 spec, would be to try to break  
support for such code early during a major Mozilla milestone cycle,  
to smoke out any customers and then persuade them to revise their to  
satisfy ES4's rules.

I know of no E4X code that depends on current identity and mutability  
rules. Zwetan (for AS3), Jeff Walden, and others may have thoughts,  
so thanks for posting this to the list.

/be



More information about the Es4-discuss mailing list