Toplevel 'let' binding can be left permanently uninitialized after an error
jason.orendorff at gmail.com
Mon Sep 29 13:17:37 PDT 2014
SpiderMonkey hacker Jeff Walden noticed this. Consider a web page that
loads and runs this script:
This leaves the binding 'x' uninitialized. There's no way to get rid
of a lexical binding or to initialize it later. The binding is just
permanently hosed; any attempt to read or write it will throw.
That by itself isn't necessarily a problem. I've never written a web
page where I wanted to recover after a toplevel script threw an
exception (or timed out). But I dunno, the impossibility of any kind
of self-healing here gives me pause.
No action required on my account; I'm posting this because we were all
surprised and it seems vaguely unaesthetic.
More information about the es-discuss