On 7/27/07, Neil Mix <[EMAIL PROTECTED]> wrote:
> Wait, am I following this correctly in that:
>
> function A() {
>        function B() {}
>        return B;
> }
>
> var x = A();
> var y = A();
>
> x.foo = 1;
> y.foo = 2;
>
> alert(x.foo + y.foo);
>
> would show "3" in current compliant implementations, but
> theoretically in the future an implementation could exist that would
> show "4" and *still be compliant*?  If I'm surmising correctly, then
> that seems...buggy.
>

That's why I am confused...

Moreover, the spec says (13.1.2):

NOTE Two or more objects joined to each other are effectively
indistinguishable except that they may have different internal
properties. The only such internal property that may differ in this
specification is [[Scope]].

As I understand, that means, if x and y are joined, then:
x === y returns true, but
x() == y() may return false, because their [[Scope]] may differ.
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to