restrictions on let declarations

Brendan Eich brendan at mozilla.com
Thu Jan 30 08:59:40 PST 2014


John Lenz wrote:
> In my model
>
> if (y) let x = 42
>
> is equivalent to
>
> if (y) {
>   let x = 42
> }
>
> and it is clear "x" in "alert(x)" is 0;

It is as clear as those invisible braces in your model's input :-P.

Come on, this is silly. "var" has quirks, but we are not propagating 
them to other forms, making implicit blocks where no braces exist, etc.

/be


More information about the es-discuss mailing list