Question: It is stated in this chapter that when nonlocal variables are accessed in a dynamic-scoped language using the dynamic chain, variable names must be stored
It is stated in this chapter that when nonlocal variables are accessed in a dynamic-scoped language using the dynamic chain, variable names must be stored in the activation records with the values. If this were actually done, every nonlocal access would require a sequence of costly string comparisons on names. Design an alternative to these string comparisons that would be faster.
Step by Step Solution
3.41 Rating (160 Votes )
There are 3 Steps involved in it
One very simple alternative is to assign integer va... View full answer
Get step-by-step solutions from verified subject matter experts
