Mark Miller (2014-10-01T17:30:29.000Z)
domenic at domenicdenicola.com (2014-10-15T18:43:10.221Z)
On Wed, Oct 1, 2014 at 9:15 AM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote: > On Oct 1, 2014, at 9:05 AM, Mark S. Miller 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? > > > The runtime cases I meant are the ones you mentioned. Sloppy with or eval > dynamically shadowing a sloppy a [[Set]] reference to a const binding. > Can't be a early error, should be a runtime error. > Although it is a bit late to suggest it ;) ... Couldn't we have "with" and sloppy direct eval ignore/skip const and let bindings? Then these errors could always be early. I have no argument with the answer "too late", but still curious if there's another reason.