Comment by kragen

5 months ago

That seems plausible. But I wonder how far you could get in a lexically scoped language using temporary assignments to variables that get automatically undone when exiting a scope, the way dynamic scope is usually implemented with shallow binding. Other domains where you often want such temporary assignments include floating-point math (execute this calculation with the rounding mode temporarily set to "upward") and graphics (execute this drawing with the current transformation matrix temporarily set to foo and the current color temporarily set to bar).