Allen Wirfs-Brock (2014-02-14T17:22:12.000Z)
On Feb 14, 2014, at 8:54 AM, Brendan Eich wrote:

> Mark S. Miller wrote:
>> I actually prefer #3. Given only knowledge of ES5 and of the rest of ES6, I find it least surprising. "var"s hoist out of blocks. In non-strict code, "function"s leak out of blocks in ways that are hard to explain. I can understand non-strict direct eval as being block-like, in that "var" and "function" leak out of them, but all the reliably block-local declarations stay within the direct eval.
>> 
>> Also, I buy the refactoring issue. It's like the problem with micro-modes: bizarre and unexpected non-local influences.
> 
> Yes, agree on #3 being best. My recollection from past TC39 meetings and discussion here is that #2 will not fly. We do not want some let buried in a large string to eval to contaminate the whole eval'ed program such that vars in it are confined, where they weren't before.
> 
> Just amplifying your refactoring point, but also noting your micro-mode/non-local comment. This is not going to win consensus.

the various forms of eval are already micro-mode, so I'm not sure if those points are very relevant.

But, I agree that #3 is a better fit to sloppy mode (ie less surprising) than #2 and avoid more refactoring hazards. 

Unless, I see the see the tide turning in some other direction #3 is what I'll put into the spec.

Allen
domenic at domenicdenicola.com (2014-02-20T01:17:58.251Z)
On Feb 14, 2014, at 8:54 AM, Brendan Eich wrote:

> Just amplifying your refactoring point, but also noting your micro-mode/non-local comment. This is not going to win consensus.

the various forms of eval are already micro-mode, so I'm not sure if those points are very relevant.

But, I agree that #3 is a better fit to sloppy mode (ie less surprising) than #2 and avoid more refactoring hazards. 

Unless, I see the see the tide turning in some other direction #3 is what I'll put into the spec.