[plt-scheme] Semantics of quote

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

On Jun 24, Robby Findler wrote:
> On Tue, Jun 24, 2008 at 12:28 AM, Eli Barzilay <eli at barzilay.org> wrote:
> > On Jun 24, Robby Findler wrote:
> >>
> >> None of those seem like good ideas. I can see why you don't like that!
> >> I wouldn't suggest that. FWIW, you can actually try this stuff out.
> >> There's the constructor-style printing in drscheme where you get:
> >
> > I know about it, of course, and it's a bad idea for general
> > hacking.
> >
> >  (define (a) 1)
> >  (define (b) 2)
> >  (list a b)
> Obviously, this prints as
>   (list a b)
> or
>   `(,a ,b)

That's not what it does now, and trying to do this properly won't work

  (list (let ([a (lambda () 1)]) a) (let ([a (lambda () 2)]) a))

> which seems just as good as
>   '(#<procedure:a> #<procedure:b>)

That's the whole point -- the "'" is a kind of a "I'm readable, you
can type me" signal, and "#<" is the opposite.  Mixing them is bad.

> But I'd be fine with a different way to print (unquoted) procedures.
> Something like we do in the teaching languages perhaps:
>   (list function:a function:b)
> or a variation on that.

Then I no longer see any point in all this.  I thought it was supposed
to be printing values in a way that is readable (or looks like it's
readable) and this is now getting to just having verbose descriptions
that are unrelated to source.

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

Posted on the users mailing list.