A bit confused by B.3.2 - Web Legacy Compatibility for Block-Level Function Declarations
John Lenz
concavelenz at gmail.com
Thu Jun 5 08:16:56 PDT 2014
That involves changing the code to use "this". But I don't want to derail
the thread here. It is sufficient to say that "eval" "with" and
"arguments.caller/callee" change behavior in strict mode and there is
enough legacy code that need to be dealt with that you can't forcing things
to always be strict mode.
On Thu, Jun 5, 2014 at 7:34 AM, Andreas Rossberg <rossberg at google.com>
wrote:
> On 5 June 2014 16:08, John Barton <johnjbarton at google.com> wrote:
> > On Thu, Jun 5, 2014 at 2:06 AM, Andreas Rossberg <rossberg at google.com>
> > wrote:
> >>
> >> On 4 June 2014 23:46, John Lenz <concavelenz at gmail.com> wrote:
> >> > I don't personally want to write sloppy mode code, but there are
> places
> >> > you
> >> > need it (using eval to introduce new symbols into global scope).
> >>
> >> You don't necessarily need sloppy mode for that. In strict mode, you
> >> can still express it as assignment to the global object.
> >
> > This excellent solution would be much more widely adopted if the global
> > object had a standard identifier, like say "global".
>
> Hm, I'm not sure why that would be a problem. What's wrong with using
> 'this' inside those evals?
>
> /Andreas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140605/780a2b8c/attachment.html>
More information about the es-discuss
mailing list