Re: Compiling macros with an optional function parameter?

"Willem Broekema" <[email protected]>
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
On Wed, Sep 24, 2008 at 9:06 PM, [email protected]
<[email protected]> wrote:
> What I don't understand, though, is why the original macro compiled and
> ran without this problem (it was only during concatenation into a larger
> binary when this error occurred).

In general, dumping a literal function object into a fasl file is not
something you can rely on. See CLHS section 3.2.4.2.2, where it says
for functions that they are "not externalizable objects". That means a
macro should not expand into source code that includes a literal
function object, but instead to its name (as you have found) or e.g. a
lambda form.

Similarly you can't just dump an instance of a class, so a macro
expansion should not include a literal instance, unless there is a
make-load-form method.

- Willem
(resent from address that is subscribed to the list, sorry for any duplicates)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.