r/programming • • Dec 22 '11

The Problem with Implicit Scoping in CoffeeScript

http://lucumr.pocoo.org/2011/12/22/implicit-scoping-in-coffeescript/
83 Upvotes

116 comments sorted by

View all comments

Show parent comment

1

u/dherman Dec 24 '11

We're definitely doing that for for-in loops, where the variable is automatically initialized each iteration by the semantics. For that, ES6 will definitely have a fresh binding for each iteration. The question in my mind is the C-style loop, where the programmer is actually mutating the local variables themselves.

1

u/gwillen Dec 24 '11

Ahhhh, I see now. That sounds like a very reasonable distinction to me. Thanks for the response. :-)