O'Reilly logo

Practical Foundations for Programming Languages by Robert Harper

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

33 Fluid Binding

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required