[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: Passing result of macroexpand-all as argument to a
From: |
Drew Adams |
Subject: |
RE: [External] : Re: Passing result of macroexpand-all as argument to a function |
Date: |
Wed, 9 Aug 2023 21:24:36 +0000 |
> The usefulness of macroexpand seems to be the ability to output
> up to a specific expansion level, that's all.
Two main uses of macro expansion:
1. For coders, to debug their macro definitions.
Expansion lets you see the code you're telling
the macro to produce.
2. For byte-compilation, so for performance.
As I mentioned the expanded code gets substituted
for the source macro call, in line. (Nay, its
byte-compilation gets substituted.)
For #1 you as a developer call `macroexpand'.
For #2 code in the byte-compiler calls it (in
effect).
> > If you byte-compile the Lisp source code then the
> > macro call gets macroexpanded during compilation,
> > and the result of expansion is then compiled to
> > produce the byte-compiled code. In effect, the
> > macro-call source code disappears and is replaced
> > by the expansion, in line, and the resulting code
> > is then byte-compiled.
- Re: [External] : Re: Passing result of macroexpand-all as argument to a function, (continued)
- Re: [External] : Re: Passing result of macroexpand-all as argument to a function, Michael Heerdegen, 2023/08/08
- Re: [External] : Re: Passing result of macroexpand-all as argument to a function, Heime, 2023/08/09
- Re: [External] : Re: Passing result of macroexpand-all as argument to a function, Michael Heerdegen, 2023/08/09
- Re: [External] : Re: Passing result of macroexpand-all as argument to a function, Heime, 2023/08/09
- RE: [External] : Re: Passing result of macroexpand-all as argument to a function, Drew Adams, 2023/08/09
- RE: [External] : Re: Passing result of macroexpand-all as argument to a function, Drew Adams, 2023/08/09
- Re: Passing result of macroexpand-all as argument to a function, Michael Heerdegen, 2023/08/08
- Re: Passing result of macroexpand-all as argument to a function, Heime, 2023/08/09
- RE: [External] : Re: Passing result of macroexpand-all as argument to a function, Drew Adams, 2023/08/09
- RE: [External] : Re: Passing result of macroexpand-all as argument to a function, Heime, 2023/08/09
- RE: [External] : Re: Passing result of macroexpand-all as argument to a function,
Drew Adams <=
- RE: [External] : Re: Passing result of macroexpand-all as argument to a function, Heime, 2023/08/09