Posts

Showing posts from February, 2005

lab 28 - side effects

NAME lab 28 - side effects DESCRIPTION I was planning on just implementing side effects, but it turned out to be a little more complicated than I thought, and then I got sidetracked into changing the evaluator to handle more of the shell semantics. The file lisp7.b implements setq but it is limited in that in cannot change the type of the value referenced by the symbol. % eval {setq a `{b c d}} (b c d) % eval {setq a `b} error at type mismatch (b c d) Fixing this requires me re-implementing the sepxrs library to remove pick from the ADT. I'll follow up on this later. Mixing shell and lisp syntax The final parser in the Sussman and Steele paper The Art of the Interpreter puts dynamic scoped variables back into the evaluator. It maintains two environments, one for lexical and one for dynamic binding. Instead of havi...