[plt-scheme] Evaluation in local environment?

From: dsj22 (dsj22 at nau.edu)
Date: Tue Apr 1 09:23:06 EDT 2008

Thanks for answer, and general prodding. I would have replied earlier, but 
once I got started again, I was writing this code from then until now.
As for the cond-statement implementation, the structure of the statement is 
almost trivial - like I said, I'd written a basic solution already. What I 
meant by convoluted, was processing the functions in the class definition file 
into expressions for the cond statement, and replacing the arguments, etc.

Mostly, thanks for asking me "Why can't you give it a label?" - that got me 
going (after making me feel stupid for trying to provide an answer).

I've got the basic implementation running now, and just need to add 
inheritance (non-trivial, but I've already got an idea of how to do it using 
the same scoping methods I've been using).

- David

>===== Original Message From Ryan Culpepper <ryanc at ccs.neu.edu> =====
>You cannot use 'eval' that way in PLT Scheme. Nor should you, even if it
>were possible.
>More importantly, using 'eval' doesn't teach you anything about scoping
>and recursion in objects, which is presumably the point of the exercise.
>This should be straightforward.
>What expression recognizes the case where the method name is 'setx and
>there is one argument?
>Why can't you give it a label?
>I recommend thinking carefully about what names need to be in scope in
>each lambda expression. Can you make an expression that gets the scopes

Posted on the users mailing list.