- From: Jim Blandy <jimb@mozilla.com>
- Date: Thu, 15 Oct 2009 10:06:21 -0700
- To: Maciej Stachowiak <mjs@apple.com>
- CC: es-discuss Steen <es-discuss@mozilla.org>, "Mark S. Miller" <erights@google.com>, public-script-coord@w3.org, Simon Pieters <simonp@opera.com>
On 10/15/2009 07:23 AM, Maciej Stachowiak wrote: > > The latter, if truly allowed by the spec, makes source-to-source > transformers, even something as simple as a pretty-printer, > potentially unsound. That seems like a much less bounded form of > insanity. > I think this point is well-taken. In the case of 'eval', ES5 requires an implementation to inspect the context of the call. A direct call to eval runs the code in the call's environment; indirect calls run in the global environment. This makes eval into a pseudo-syntactic form: really, expressions of the form 'eval(...)' are special to the compiler, regardless of eval's binding. The way Mozilla treats 'document.all' seems analogous. > (It's been raised that debugging APIs may have behavior that depends > on the calling context. That may be true, but exposing debugging APIs > directly to normal code would violate important assumptions. Well, my point there was more that approaching the question in terms of whether a given behavior is permitted by the spec doesn't advance the conversation much. For native objects, the spec is powerless to forbid truly horrible things; it's too low a bar.
Received on Thursday, 15 October 2009 17:07:20 UTC