Javascript has a similar problem, but you solve it in a weirder way (with self-calling functions).
Javascript has function scope variables (var) so the problem is limited to a function, not the entire scope chain. And "let" is coming in ES6 to give us block scope. And guess what "do" does, it takes a function and calls it in that weird way you're talking about.
View all comments
Show parent comment
1
u/didroe Jul 26 '13
Javascript has function scope variables (var) so the problem is limited to a function, not the entire scope chain. And "let" is coming in ES6 to give us block scope. And guess what "do" does, it takes a function and calls it in that weird way you're talking about.