On 9/17/2014 7:51 PM, Bill McCloskey wrote:
If this change proves to be really disruptive to add-on authors, I wonder if we could just make 
"let" behave like "var" for add-ons? The JS tokenizer could just substitute var 
for let when parsing code from an add-on compartment. (Bug 1030420 will put add-on code in a 
separate compartment and it's ready to land soon.) I think that would mostly mitigate the concerns 
Jeff raised in the previous thread about having to test two configurations.

-Bill

Substituting var for let does not result in code that behaves identically to previous code, so I can't see why that would be proposed.

These two snippets give different results:

let s = "valid";
{ let s = "invalid";}
dump(s);

gives a different result than
var s = "valid";
{ var s = "invalid";}
dump(s);

If you wanted a reasonable compromise, only flagging the duplicated definition of "let" in strict mode would be a viable solution.

:rkent

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to