[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Defining the forms to which the # constructs expand

    Date: 16-Nov-82 16:25:04 PST (Tuesday)
    From: Masinter at PARC-MAXC

    ..., but the most natural way to do this is to READ in the program,
    apply a transformation, and prettyprint it out again. It isn't
    acceptable if information like #. and #, get lost. It is preferable
    that the mechanism by which that information is preserved is visible,
    so that the code walkers can know about it.

    You may not think this is an important kind of thing to do, but it seems
    that defining COMMON-LISP in a way which precludes building such tools is
    unnecessary and a mistake.

Common Lisp is already chocked full of reader features that cannot be
preserved across an operation such as you discribe.  Things like the case
of symbols and the base of numbers are all lost in this procedure.  The ";"
comment character is pretty hard to deal with through reading and printing
(you can't just expand into a form), and no scheme I have yet seen will
properly preserve all cases of "`"'ed expressions (although the MacLisp
scheme for this is pretty close).

I would NEVER run any of my MacLisp or LispMachine code through READ and
then PRINT, it would render it totally unreadable.  If precluding such
tools is a mistake, then we have made that mistake long ago.