[plt-scheme] Semantics of quote

From: Anton Tayanovskyy (anton.tayanovskyy at gmail.com)
Date: Mon Jun 23 16:28:56 EDT 2008

Hi Mark,

A few weeks ago I was asking myself the same question. Glad I'm not
alone being confused. However, consider:

guile> (cons 'quote (cons 'a '()))
(quote a)

So not all Schemes print 'a instead of (quote a).

As for your second example, besides the quote issue, it's a nice
illustration of how macros work. They don't really work as procedures
- the arguments are not evaluated. I banged my head at this for a
while, read Oleg Kiselyov's _Systematic Macro Programming_, tried
those CPS style macros in PLT Scheme, was amazed at how long the
expansion takes, and then discovered define-macro...



On Mon, Jun 23, 2008 at 11:06 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
> 'a really, truly evaluates to 'a, which means for an reduction semantics,
> you can really view 'a as a value.
> But the PRINTER renders 'a as a and ''a as 'a, which you correctly
> identified.
> The sad thing is that this is needlessly confusing, especially for
> beginners. It is one of the reasons we have teaching languages that (1)
> don't allow quote for anything but symbols (pop quiz: is ''a a symbol?) and
> (2) renders things as constructed values (think abstract or universal
> algebra, if you're familiar with that).
> -- Matthias
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.