For Programmers: Free Programming Magazines  


Home > Archive > Scheme > January 2008 > Simple scheme environment









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Simple scheme environment
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>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com