Consider the following FLANG test:
If this test succeeds, which kind of scope is it using?
Examine the following code block in the context of the dynamically-scoped version of FLANG. What does it evaluate to?
Which of the following is true about substitution caches?
The FLANG implementation with substitution caches features lexical scoping rather than the dynamic scoping of the previous substitution based FLANG interpreter.
subst function remains unchanged once the
extend functions are in place.
The formal rules for cached substitutions remains unchanged from
the previous FLANG
eval formal spec.
Evaluation by substitution is efficient because the AST is copied at each scope.
None of the above.
What are the possible use cases for dynamic scoping?
Allows for curried functions.
Controlled dynamic-scope allows flexibility in customizing programs.
Changing the semantics of a program.
Enables efficient compilation.
Simplifies reasoning about code.
Recursion is immediately available.