[plt-scheme] Semantics of quote

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Jun 23 15:15:25 EDT 2008

Yeap, isn't it confusing? :-)

Quoted expressions are self-evaluating, but not self-printing a point  
of endless confusion to beginners -- as you may recall from 1991.


On Jun 23, 2008, at 3:08 PM, Mark Engelberg wrote:

> Some examples:
>
> (cons 'quote (cons 'a empty)) prints as 'a


But what does 'a mean? Where did it come from? How does

'a print in a "real" Scheme, after evaluating to itself?
''a print in a "real" Scheme, after evaluating to itself?
'''a print in a "real" Scheme, after evaluating to itself?
''''a print in a "real" Scheme, after evaluating to itself?

-- Matthias




>
> Consider:
> (define-syntax my-quote
>   (syntax-rules ()
>     ((my-quote expr)
>      (quote expr))))
>
> (quote (quote a))
> and
> (quote (my-quote a))
>
> yield different outputs.
>
> --Mark
>
> On Mon, Jun 23, 2008 at 7:52 AM, Jos Koot <jos.koot at telefonica.net>  
> wrote:
>> Can you be somewhat more specific? What kind of subtle things do you
>> encounter?
>> jos
>> ----- Original Message ----- From: "Mark Engelberg"
>> <mark.engelberg at gmail.com>
>> To: "pltscheme" <plt-scheme at list.cs.brown.edu>
>> Sent: Monday, June 23, 2008 6:25 AM
>> Subject: [plt-scheme] Semantics of quote
>>
>>
>>> Can anyone point me to a fairly precise explanation of quote?
>>> Sometimes I encounter subtle things that make me wonder whether my
>>> mental model of how quote works is accurate.
>>>
>>> --Mark
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.