[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro expansion
- To: CSVAX.fateman at BERKELEY
- Subject: Re: macro expansion
- From: Alan Bawden <ALAN at MIT-MC>
- Date: Tue ,25 Nov 80 02:15:00 EDT
- Cc: LISP-FORUM at MIT-MC
Date: 24 Nov 1980 21:02:02-PST
From: CSVAX.fateman at Berkeley
Why do you say the macros are being mis-used? If there are no
incompatibilities when the expansion converges, why not give it a
better meaning when the expansion does not converge?
Well I heven't yet accused anyone of mis-using anything since I am
still trying to figure out just what we are talking about. I am not
sure I can imagine a reasonable interpretation for a divergent macro
expansion other than as an error. In fact I think I prefer that it
get a PDL overflow so that I can find out that I am losing right away,
rather than waiting untill I grow suspicious waiting for my program
finish. (It also helps in debugging if macros are expanded
recursively; you can poke back up the stack and look at the original
code before the macro expanded it into a DO with 69 GENSYMed labels...)
Friedman about compilation, and he said he is not interested in
that... As for a clearly USEFUL example, I cannot provide one off
the top of my head, but you might look at some of Friedman's
papers, perhaps. I have no particular stake in this personally.
Anyone who doesn't care about compilation, and who also wants some
peculiar features in his interpreter, is a good candidate for writing
his own interpreter! My misgivings about munging with the way that
macros are exapanded only extend as far as real-world Lisp programmers
are forced to live with the result. I am as interested as anyone in
interpreters with unusual and/or theoretically interesting properties.
I have lost count of the interpreters I have written just to see what
it is like to type to a read-eval-print loop with X strange property.
Writing a Lisp interpreter in Lisp is an easy exercise that
practically anyone can do (after all, someone else has already done
the really hard part: written all the subrs!).