Throwing errors on mutating immutable bindings

Allen Wirfs-Brock allen at
Wed Oct 1 08:50:47 PDT 2014

On Oct 1, 2014, at 7:09 AM, Erik Arvidsson wrote:

> The static error is problematic. I'm pretty sure that engines that do lazy parsing of functions is not going to report static errors before doing a full parse of the function.
> I think we need to either enforce this or remove this restriction. Anything in between will lead to inconsistent behavior between engines.

There is nothing in between about the intent of the early error in the specification.  It is mandatory, just like all other specified early errors. We do need to improve the specification language and ideally we should have an algorithmic specification of the error check.  However, the latter is probably not going to be done for ES6 unless somebody has time to make a suitable contribution to the spec.


More information about the es-discuss mailing list