> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of liorean > Sent: 4. april 2008 10:47 > To: [email protected] > Subject: Re: Strict mode recap > > On 04/04/2008, Lars Hansen <[EMAIL PROTECTED]> wrote: > > Your comment about inhibiting static analysis isn't right; if ns::x
> > is a name then either ns is known to be constant at compile time or > > not, and if it is, then nothing prevents early binding. ES3 systems > > perform analyses that are inhibited by eval and with, and statically > > detect whether eval and with are used in order to decide whether to > > perform the analyses. > > I thought the argument was about the ns::[name] form... While > the namespace may be known at compile time, the actual > variable name is not - which means that the implementation > actually has to be able to look local variable names up as > strings, instead of just object members. > > That is similar in effect to locally scoped eval. ES3 allows > restricting eval such that this string look up only has to > work if the compiler actually sees an "eval" in the fucntion > body, though. I guess the same argument can be made for these > dynamic namespace lookups too, however. Sure, the situation with a variable namespace name and variable identifier string is the same, and it is always visible to the compiler. (BTW I believe that locally bound names in ES4 cannot have explicit namespaces, but that these names are defined in the common public namespace (the one Jon calls 'null' though it will probably end up being called 'public'). The forthcoming spec on names and name lookup will clarify.) --lars _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
