| Oliver Ruebenkoenig 2008-01-18, 8:17 am |
|
Hello Schemers!
The question that is bugging me is the following. I was wondering if the
scheme environment model could be done in another approach than presented
in SICP. So here is what I came up with:
Each time a procedure is created the arguments of the procedure are
replaced by unique symbols ( e.g. x is transformed to e.g. x-43). Once the
procedure is applied the variable x-43 gets is value assigned and the body
is evaluated.
At the end of the lifetime of a procedure the procedure's arguments also
have to be disposed.
This would allow to implement the environment in a single table. Does this
make any sense? I have the impression I have overlooked some detail of
what the SICP environment model provides. Thanks for you comments.
Oliver
Oliver Ruebenkoenig, <ruebenko AT uni-freiburg.de>
|