[plt-scheme] Semantics of quote
On Jun 23, Robby Findler wrote:
> Oops, forgot to include this in my message below:
>
> Welcome to DrScheme, version 4.0.1-svn21jun2008 [3m].
> Language: Module custom; memory limit: 128 megabytes.
> > (list +)
> (list +)
I take it that you'll want to see this then:
> '(+)
(list '+)
> ''(+)
(list 'quote (list '+))
> '''(+)
(list 'quote (list 'quote (list '+)))
> '(if (< x y) (+ x y) -1)
(list 'if (list '< 'x 'y) (list '+ 'x 'y) -1)
This is even worse. I spent a few years working on getting the
advantages of a constant-size addition for quotation (where each level
of quotation can be represented by a constant (or at least linear)
addition) -- in other words, I spent nearly a decade talking about why
quoting is good, and you want to throw this natural advantage and
intentionally make it print with the exponential representation.
> On Mon, Jun 23, 2008 at 11:52 PM, Robby Findler <robby at cs.uchicago.edu> wrote:
> > (list +) is fine. In general, there are exactly as many unprintable
> > values as there were before, I believe (or at least there should be
> > ...). Pretty-printing also seems okay, but I'm not sure where you're
> > going with that one.
> >
> > Robby
> >
> >
> > On Mon, Jun 23, 2008 at 11:20 PM, Eli Barzilay <eli at barzilay.org> wrote:
> >> On Jun 23, Matthias Felleisen wrote:
> >>>
> >>> On Jun 23, 2008, at 7:24 PM, Robby Findler wrote:
> >>>
> >>> > While what Carl says is true, I believe the spirit of the question is
> >>> > more like "why isn't constructor (or quasiquote) printing the default
> >>> > for the 'scheme' and related languages"?
> >>> >
> >>> > To which I say "I have suggested this myself! :)"
> >>>
> >>> By all means, go for it!
> >>
> >> -1 -- since this runs into a bunch of messes like not going well with
> >> pretty printing, or unprintable values like (list +)...
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!