On 18 July 2012 12:35, David Bruant <bruan...@gmail.com> wrote: > I also don't think that array length counts as proper precedence. Array > length is a magic property _on the instance_, whose magic is limited to > that specific instance, whereas __proto__ would be a magic property _on the > prototype_, thereby introducing _cross-object_ magic. I'd argue that's > quite a different quality. Do we have any precedence for that? > > It simply seems entirely incoherent to me that a single _data_ property > should exhibit different values when accessed through different receivers. > From my perspective, that's a significantly more fundamental violation of > the JS object model than the magic that comes with array length. > > Proxies are an even more fundamental violation of the JS object model. >
Agreed (and one of the reservations I actually have about adding proxies). However, proxies are proxies. True, we cannot efficiently _enforce_ many behavioural invariants for (user-defined) proxies. But that does not imply that we should feel free to actively _break_ more invariants for (language-defined) non-proxies. /Andreas
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss