On Sep 13, 2011, at 6:20 PM, Carter Cheng wrote:
> This probably is a rather basic question but I am curious about the
> change from static to dynamic scopes between 1.8 and 1.9 for block
> scopes. What was the primary motivation for this(my understanding is
> most people have moved to static scopes due to odd interaction issues
> in most languages)?

I'm not sure how to interpret your question.  There are differences in the scope of block variables between 1.8 and 1.9 but I don't think I've ever seen 'static' and 'dynamic' used to describe the differences.  There are also differences in the constant lookup rules and they are different between 1.8, 1.9.1, and 1.9.2 and in that case 'static' and 'dynamic' might indeed be helpful in understanding the issues.

IMHO it isn't worth trying to understand 1.9.1 rules.  Just focus on 1.9.2 if you've got questions.

Anyway, back to block variables in 1.9.2.  The basic reason for the change there was to have block parameters shadow any variables in the outer scope.  In general this keeps a programmer from inadvertently trashing the value of a local variable or formal parameter with a block variable.  It does break some code that depended on the 1.8.7 behavior (where block variables reused the outer scope).

As for the rules on constants, I'm not 100% up to speed on the changes so I suggest some googling for answers in that area or perhaps a more focused question posted here. 

Gary Wright