lexical for-in/for-of loose end
herby at mailbox.sk
Tue Feb 7 02:28:18 PST 2012
Brendan Eich wrote:
> Grant Husbands wrote:
>> * Both of them make closures in the init and in the rest see a
>> consistent world, for as long as is possible, while still giving body
>> closures unique copies per iteration.
> Is there any inconsistency observable after "as long as possible"? I
> can't find one.
It is a question if it is inconsistency, but init-closures called from
inside body-closures have different impact when called while
body-closure is live and after it is "detached".
The from-live call works the actual variables, which the caller actually
uses, but in the from-detached call, they work with the past-the-loop
loop-context/last-iter-context variables, while the body-closure has its
own local copies.
More information about the es-discuss