On 15 February 2014 06:10, Brendan Eich <[email protected]> wrote: > Allen Wirfs-Brock wrote: >> >> On Feb 14, 2014, at 11:38 AM, Jeremy Martin wrote: >> >>> > On further reflection, #3 does feel like trying to rewrite the past. >>> > For better or worse, non-strict mode allows declarations to persist past >>> > the >>> > eval(). And while strict mode provides a license-to-kill on behavior like >>> > that, I don't really see strong justification for that kind of surprise >>> > factor for let in non-strict mode. >>> > > If you're not using strict mode AND you're using eval(), the damage >>> > is arguably already done (or at least the danger already exists). >>> > Changing >>> > the behavior of let in this case feels like removing an arbitrary* >>> > foot-gun >>> > when we're already in the armory, so to speak. >>> > > * Granted it's not completely arbitrary, since `let` is new whereas >>> > `var` is not, but hopefully you get my point. >> >> >> Another consideration in the back of my mind is that there may be useful >> to implementors to knowing that let/const/class declaration are never >> dynamically added to a non-global environment. > > +lots, this should be front of mind. > > In a block, we want the bindings local to that block to be statically > analyzable. We want no non-local mode effects. So, #3 still wins.
Strongly seconded. /Andreas _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

