archives

« Bugzilla Issues Index

#311 — Need final decision on for(let;;) scoping semantics


At the Jan 2012 meeting the recorded consensus was that for(let;;) loops should have normal per iteration bindings of the declared let variables.

However, since then a number of concerns about this decision have been raised and alternatives have been proposed.

The main alternatives are:
1) a single set of let bindings for all iterations of the loop
2) per iteration bindings with copying of let values between per iteration bindings (does not preserve closure capture transparency)
3) per iteration bindings with reference mapping between across loops for closure captured bindings.

There is a an extensive discussion of alternative on the ES-discuss thread that is (mis-)titled Lexical for-in/for-off loose ends. A good starting point to review that discussion is https://mail.mozilla.org/pipermail/es-discuss/2012-February/020352.html


fixed in rev23 editor's draft


fixed in rev23 draft