On Fri, Oct 01, 2010 at 07:54:01AM -0400, bearophile wrote: > > barring crazy stuff like dynamic scoping) > > I don't know what dynamic scoping is, do you mean that crazy nice thing named > dynamic typing? :-)
"Nice"? I hate dynamic typing with a passion! It offers very few benefits and only in very specific locations.... Anyway, dynamic scoping is where a variable name can refer to different things based on where it is in runtime. The language walks to stack upward to find the first instance of the variable. So a local variable in a calling function can override a global name in the function it calls. I've seen it in Common Lisp; I find it weird. But there's an example on Wikipedia: http://en.wikipedia.org/wiki/Dynamic_scoping#Dynamic_scoping