Tuesday, February 23, 2010

JavaScript scopes

At a first glance I was asking myself: why the hell one has designed scopes that way?

Javascript: The Scope Pitfall

I'm still in affection, but I'll try to find the positives of both resigning from block scopes and having pointer-based closures.

By the way, this seems to be a good article about JavaScript closures.