[plt-dev] Re: [plt-bug] all/10895: quasiquote printing is buggy, confusing

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Wed May 5 13:48:44 EDT 2010

On Wed, May 5, 2010 at 1:36 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> When printing out things that look like programs, the qq-based printer
> is really invaluable, but my experience is that the constructor form
> is better for everything else.
> I never seriously experimented with hybrids, however, because I feared
> that the rule for deciding between (list ...) and `(...) would be too
> brittle.
> Perhaps it is time to give it a try, tho?
> Robby

I think this is either a quirk of working with
expressions-as-s-expression (e.g. Redex) or just of working with
purely s-expression-based data.  I'm going to guess that most of your
output doesn't actually use the "quasi" part of "quasiquote", which is
the confusing part.

Perhaps our printer should use constructor-style printing until it
gets down to a quotable datum, at which point it can use regular
quote?  Then s-expressions print simply, Redex output will look like
programs, but interleaved s-expressions, structures, and other
un-quotable data will not be a mess of backticks and commas.  This
goes back somewhat on my previous statement about different
representations of lists in one kind of output, but I think it may be
a more manageable kind of switch in that it won't go back and forth,
quote will always be only at the leaves.

Alternately, perhaps there simply are different output requirements
for different applications, and anyone using just s-expressions with
no structures or opaque data should manually select quasiquote style
printing (either on the menu or with an explicit update of


Posted on the dev mailing list.