[plt-scheme] Self evaluating "objects"

From: Cristian Baboi (cristian.baboi at gmail.com)
Date: Mon Jul 14 10:39:40 EDT 2008

On Mon, 14 Jul 2008 17:25:41 +0300, Chongkai Zhu <czhu at cs.utah.edu> wrote:

> Cristian Baboi wrote:
>>
>> Some more examples:
>>
>> (begin
>> (define x 3)
>> (eval 'x (scheme-report-environment 5))
>> )
>>
>> (begin
>> (define x 3)
>> (eval 'x (interaction-environment))
>> )
>>
>> both return 3 in Gambit-C, but the first gives "reference to undefined  
>> identifier: x" in PLT


> Your previous post does show that PLT is not comform to R6RS. But this  
> one isn't. 'x is defined in interaction-environment but not  
> scheme-report-environment.
>
> Chongkai

It was not my intention to show that PLT is not conform to R6RS!
I only try to see how I can use scheme to evaluate dynamic generated code.

This code does not work for example:

(define (c)
   (let ((x 3))
     (eval 'x ))
)

(c)

I know how to quote some code, but I cannot see how I can "unquote" it.


Posted on the users mailing list.