>>20
But
local is too long for the most common scope.
Explicit scope is a good thing for scripting languages. Having either as a default is not my cup of tea, because it's better to always see where the variable is introduced in a given scope, and which scope it is introduced to (eg
my vs.
our in Perl.)
In languages like C it's not such a big deal. If you're writing one of those you will be avoiding globals much more eagerly.
>>26
You think JS is bad for dynamic scope? Try writing bash sometime. Loop constructs all introduce dynamic scope, so good luck using data you've accumulated/processed in a loop.