[plt-scheme] Semantics of quote

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jun 24 08:50:29 EDT 2008

On Jun 24, Matthias Felleisen wrote:
> On Jun 24, 2008, at 1:50 AM, Eli Barzilay wrote:
> > I thought it was supposed
> > to be printing values in a way that is readable (or looks like it's
> > readable)
> > the quote is meaningless as a consructor
> Eli, QUOTE is NOT a constructor.

Right, I should have said "constructor-shorthand" or something along
these lines.

> As you well know, QUOTE doesn't even exist anymore at compile
> time. It's gone.

Yes, one point I made was just that -- that printing a quote means
adding it to the output.

> Constructor-style means "algebraic construction of the data, plus  
> sharing" (cons, make-foo, vector, etc).

In both cases you're trying to print out things in a way that can be
entered back in to reconstruct the value (with quasiquote being just a
shorthand for the case of pairs) -- and since that is not possible
you're forced to mix some descriptions (for stuff that you describe)
with things like #<blah>.  So instead of "algebraic" printouts you get
some confused mix of
- limited "algebraic-like" subset
- "here's roughly how it looks like" subset (eg, "(lambda (a1) ...)",
  or `lazy' that prints as `delay')
- plain unreadable stuff (like input ports)
and in the process you step over custom struct writers.

> This has nothing to do with reading but comprehension.
> QUOTE is incomprehensible for the novice and living w/o is  
> impossible, too, especially QUASI and QUINE. Constructor style  
> printing is a bridge between the two worlds.

I agree with the problems novices have, but that's exactly an argument
for wiring the printer to the language, so htdp languages can have the
algebraic printout/quasi shorthands that can actually work in that

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.