[comp.lang.scheme] Why does

john@uw-nsr.UUCP (John Sambrook) (12/10/88)

First, regarding the future of Scheme, I'd like to note that one of my
friends here at the University of Washington will be teaching a small
class of mechanical engineers (something) about software engineering.
He will be using Scheme, and not Fortran, which I guess was quite a
coup on his part.

At any rate, he and I were talking, and he commented that he had 
discovered (though it is documented in the manual) that, in MacScheme
it is the case that (eq? car car) ==> ().  I was suprised by this.
Could someone please explain what's going on here?  

Thanks,

-- 
John Sambrook                        Internet: john@nsr.bioeng.washington.edu
University of Washington RC-05           UUCP: uw-nsr!john
Seattle, Washington  98195               Dial: (206) 548-4386

jbs@fenchurch.mit.edu (Jeff Siegal) (12/11/88)

In article <1440@uw-nsr.UUCP> john@nsr.bioeng.washington.edu (John Sambrook 548-4386) writes:
>[...]in MacScheme
>it is the case that (eq? car car) ==> ().  [...]
>Could someone please explain what's going on here?  

I can guess at the following explanation:

In MacScheme, Scheme primitives are not really procedures, but when
you reference them, the compiler generates a procedure "wrapper" (i.e.
"car" becomes "(lambda (l) (car l))" 

It does this each time the primitive is used as a value (so each "car"
refers to a different wrapper procedure).  

This behavior is wrong according to R3RS (3/4 of the way into Sect 6.2)

Jeff Siegal