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

Restrictions on what macros may call, to avoid needing to preload file



    Date: 1985 May 05 17:24:22 PST (=GMT-8hr)
    From: Robert Elton Maas <REM at IMSSS.SU.EDU>
    Sender: REM%IMSSS at SU-SCORE.ARPA (for undeliverable-mail notifications)
    Reply-To: REM%IMSSS at SU-SCORE.ARPA (temporary until nameservers up)
    To:   Common-LISP at SU-AI.ARPA
    Re:   Restrictions on what macros may call, to avoid needing to preload file

    Today somebody mentionned the problem of having to preload a file of
    macros interpreted (in the compiler environment) before being able to
    compile that same file, because of the macros needing themselves.

    I encountered a more subtle problem which likewise requires preloading
    the file of macros. In my case I was being careful not to have a macro
    depend on itself, but it did depend on EXPRs in the same file. . . .
    EXPRs are merely compiled and written to output, not also loaded. . .

    I'm on the verge of rewriting all my macros that have subfunctions to
    avoid subfunctions entirely, . . .

What's wrong with

(defmacro burble (blah ...) (burble-internal blah ...))

(EVAL-WHEN (EVAL COMPILE LOAD)
(defun burble-internal ...)
)

I use it all the time for exactly the problem you mentioned.

	-- Richard