[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defining the forms to which the # constructs expand
- To: (MOON at SCRC-TENEX)
- Subject: Re: Defining the forms to which the # constructs expand
- From: Masinter at PARC-MAXC
- Date: Tue, 16 Nov 1982 20:25:00 -0000
- Cc: common-lisp at SU-AI
- In-reply-to: MOON's message of Tuesday, 16 November 1982 15:22-EST
Foo. By a residential system, I mean one in which you can write programs in Lisp to
write and modify programs (using the normal S-expression representation of the
program), and have the program-modified programs be first class.
I suppose since you haven't seen the point of this, I should give an example.
Let's suppose, for example, that I wanted to swap the order of arguments to a
function. I might write a program/edit command which would go through my code,
switching the arguments, and wrapping the whole thing with a LET if necessary
to enforce argument evaluation.
I could imagine writing TECO macros to do this, where you look at the text and
pretend that you were looking at the s-expression, 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.