- From: Allen Wirfs-Brock <Allen.Wirfs-Brock@microsoft.com>
- Date: Sat, 26 Sep 2009 01:34:49 +0000
- To: Maciej Stachowiak <mjs@apple.com>, Krzysztof MaczyĆski <1981km@gmail.com>
- CC: "public-webapps@w3.org" <public-webapps@w3.org>, Brendan Eich <brendan@mozilla.com>, "public-html@w3.org" <public-html@w3.org>, es-discuss <es-discuss@mozilla.org>
>-----Original Message----- >From: es-discuss-bounces@mozilla.org [mailto:es-discuss- ... >But ECMAScript doesn't have a way to distinguish normal property >access from property access via lexical scoping. In the ES5 specification it does. Reference that that resolve to property accesses are explicitly distinguished from those that resolve to environment records. This includes object environments such as the global environment and with environments. >It's unclear whether >you could say an object is actually "the same" but happens to give >different answers for scope chain access and direct property access, >and possibly even different answers depending on which scope chain it >was found in. I would think that strains host object exemptions to the >breaking point. Accesses to the global object are mediated through a object environment record, but the actual access to the global object's properties take place using "internal methods" [[Get]], [[Put]], [[DefineOwnProperty]], etc. regardless of whether the access was initiated via a direct property reference or via an environment record. However, because neither ES3 or ES5 (except for a only a couple new requirements) really define or require specific semantics for host object internal methods virtually anything goes. Even behavior that differs depending upon the "calling context" of the internal method. (although "internal methods" aren't real and aren't actually called). When ECMAScript says "host object" it is really saying "arbitrary implementation dependent magic could happen here. Allen
Received on Saturday, 26 September 2009 01:35:35 UTC