afz@cis.ufl.edu (Aric Zion) (06/04/91)
I am working on a program that will translate Common Lisp to Scheme, so that DEC's Scheme->C translator can then convert the Scheme to C. I have come up against a couple of problems, and I would appreciate some help. PROBLEM 1 --------- In SCHEME, (define ab-list '(a b)) performs the side effect and also evaluates to => ab-list In LISP, (setf ab-list '(a b)) also performs the side effect but evaluates to => (a b) PROBLEM 2 --------- SETF is global if the argument does not exist locally DEFINE is local even if the argument does not exist locally for example, In SCHEME, (define x 4) (define (somefunction) (define x 3) ) (somefunction) x => 4 But in LISP, (setf x 4) (defun somefunction () (setf x 3) ) (somefunction) x => 3 What can I do in these cases to make SCHEME emulate LISP. Please respond to: afz@reef.cis.ufl.edu Thanks, Aric Zion