Oliver Hunt (2014-10-01T16:43:09.000Z)
domenic at domenicdenicola.com (2014-10-15T18:42:31.129Z)
> On Oct 1, 2014, at 9:05 AM, Mark S. Miller <erights at google.com> wrote: > > Good point. If we can require all such assignments to be rejected statically, why is a runtime assignment to a const variable even possible? Can't we just assert that this cannot occur? You mean duplicate assignment? IIRC the problem is code that does ```js const x; x=blah; ``` or ```js if (foo) const x = bar else const x = wiffle ``` etc Whether this is actually still something that exists - I recall in JSC many years ago we had to allow: ```js for (......) { const x = ... ... } ``` Even though that is technically duplicate assignment. But i guess that last case is less relevant as const is now always block scoped isn't it?