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

Misfeature: macros expanding into declarations

    Date: Sat,  4 May 85 18:26:24 EST
    From: Tim McNerney <TIM>
    To:   Fahlman at CMU-CS-C
    cc:   TIM, common-lisp at SU-AI, RAM at CMU-CS-C
    Re:   Misfeature: macros expanding into declarations

        Date: Sat, 4 May 1985  07:36 EDT
        From: Rob MacLachlan <RAM at CMU-CS-C.ARPA>

            The Common Lisp feature of allowing a macro to expand into
        declarations ought to be flushed; it complicates much code while
        giving no useful return.

    Although this "misfeature" makes life much harder on the Lisp
    implementor and the macro writer, its semantics are not
    without utility.  Let me illustate this with a couple of simple examples:

Implementor, shmimplementor!  I don't think we're trying to
optomize things for the implementor, but CERTAINLY we care about
the macro writer, 'cause that's EVERYBODY!  One thing this
feature overlooks is the (admittedly bad) behavior of some macro
writers that write overly-circular code, in which too-early
expansion of macros kills the program.  We've all seen the
garbage codes that must be loaded interpreted first and THEN
compiled; I've ported a couple of systems that depended on this
rubbish and had troubles because of the early macro expansion
(which I eventually had to turn off).  I'll send anyone who cares
my wonderful Symbolics Common Lisp function

Anyway, at LEAST if we're going to continue to have this feature,
there must be some flag that is set when we're doing "early"
macro expansion so that the macro writer can tell how to expand,

	-- Richard Soley