Brendan Eich wrote:
also raises issues like, what scope does an indirect eval use? I haven't head anyone recently advocating for TLpSi. You can achieve almost the same thing using SQ by wrapping a block around each script body.
Right, although TLpSi is still attractive as a parallel to function bodies, where we agreed body-level let has to bind in a body block that shadows parameters and vars. Not much of a plus but it's a plausible alternative.

did you just say that this is legal:

function f() {
     var b;
     let b;
}

and interpreted as:

function f() {
     var b;
     { let b; }
}

I didn't say that. Your

https://mail.mozilla.org/pipermail/es-discuss/2012-January/019817.html

has two alternative rules, either way var vs. let at top level for a given name is an error.

Of course, I *did* say "shadows ... vars" but I was thinking of parameters. Andreas in followups in the thread cited above argued that such let vs. arg shadowing might be ok, it was a minor point.

To your point, I think we did agree at the meeting with making let vs. arg as well as let vs. var an error.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to