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

Re: macro expansion



    Date: 24 Nov 1980 16:50:54-PST
    From: CSVAX.fateman at Berkeley

    Friedman would like to use this notion of macro expansion for
    implementing control structures (like "while true do ...", or
    "and" of a very large number of objects. ).  I believe
    it could also be used in conjunction with partial evaluation schemes.

    Yes, an infinite loop is to be preferred to a stack overflow, since the
    latter reveals the machine dependence of the implementation unnecessarily.
    (Friedman seems to prefer it for other reasons too.)

I still would like to see an example.  I suspect that the application
constututes a mis-use of the macro facility, but I would like to see
an example before passing such a judgement.  (My suspicions are
especially aroused by the fact that no correct usage of macros that I
can imagine is recursive enough to upset a non-tail-recursive
macro-expander.)

Test to determine if something is mis-using macros:

	Can you compile a program that uses these macros?

If the answer to this question is "no", or even just "maybe" or
"sometimes", then macros are being mis-used.