In this chapter we return to the concept of dynamic scoping of variables that was criticized in Chapter 8. There it was observed that dynamic scoping is problematic for at least two reasons:
• A bound variable may not always be renamed in an expression without changing its meaning.
• Because the scope of a variable is resolved dynamically, type safety is compromised.
These violations of the expected behavior of variables are intolerable, because they are at variance with mathematical practice and because they compromise modularity.
It is possible, however, to recover a type-safe analog of dynamic scoping by divorcing it from the concept of a variable and instead introducing a new mechanism, called fluid, or dynamic, binding ...