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

Incredible co-incidence about the format ((MACRO . f) ...)



    Date: Monday, 1 February 1982  10:47-EST
    From: Jon L White <JONL at MIT-MC>
    To:   common-lisp at SU-AI
    cc:   LISP-FORUM at MIT-MC
    Re:   Incredible co-incidence about the format ((MACRO . f) ...)

    One of my previous messages seemed to imply that ((MACRO . f) ...)
    on the LISPM fulfills the intent of my second suggestion -- apparently
    there is a completely unforseen consequence of the fact that
       (FSYMEVAL 'FOO) => (MACRO . <foofun>)
    when FOO is defined as a macro, such that the interpreter "makes it work".
    However, MACROEXPAND knows nothing about this format, which is probably
    why the compiler can't handle it; also such action isn't documented
    anywhere.

Of course MACROEXPAND knows about it (but not the version you looked
at).  I discovered this BUG (yes, BUG, I admit it, the LISPM had a
bug) in about 2 minutes of testing this feature, after I told the
world I thought it would work, and fixed it in about another two
minutes.

    Thus I believe it to be merely an accidental co-incidence that the
    interpreter does anything at all meaningful with this format.   My
    "second suggestion" now is to institutionalize this "accident"; it
    certainly would make it easier to experiment with a pseudo-functional
    programming style, and it obviously hasn't been used for any other
    meaning.

JONL, you seem very eager to make this be your proposal -- so be it.
I don't care.  However, it works on the Lisp Machine (it was a BUG
when it didn't work) to have (MACRO . foo) in the CAR of a form, and
thus it works to have a lambda macro expand into this.

Of course, Lambda Macros are the right way to experiment with the
functional programming style -- I think it's wrong to rely on seeing
the whole form (I almost KNOW it's wrong...).  In any case, the Lisp
Machine now has these.