Toplevel 'let' binding can be left permanently uninitialized after an error

Andreas Rossberg rossberg at
Tue Sep 30 04:03:43 PDT 2014

On 30 September 2014 12:52, Jason Orendorff <jason.orendorff at> wrote:
> I just realized this has an unfortunate implication for REPLs. Suppose
> you make this typo:
>     js> let x = Math.cso(a)    // oops, TypeError, should be Math.cos
> Now x is irreparably hosed in your REPL. That seems bad.

No surprise. One of the reasons why I always favoured a nested scopes
model for multiple scripts...


More information about the es-discuss mailing list