>
>
> [snip]
>
> >
> > Anyway, now that I've confirmed my suspicions, I'm hesitant about the
> private names proposal as described. The fact that declaring a certain name
> as private affects _all_ property name lookups in that scope (all lookups
> that use the dot operator or object literal syntax, at least) — well, I'm
> not sure I like the implications. It would mean a new and _surprising_
> distinction between dot notation and bracket notation.
>
> There is already a distinction between dot notation and bracket notation:
> var obj = {0: "zero", foo: "foo"};
> var foo = 0;
> print ( obj.foo === obj[foo]); //false, really obj.foo ===obj[42]
>
>
Wait, what? The correct comparison would be `obj.foo === obj["foo"]`. But
perhaps something got removed -- where does `obj.foo === obj[42]` even come
from?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss