[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't compile
From: |
Robert Thorpe |
Subject: |
Re: Can't compile |
Date: |
28 Feb 2007 03:08:18 -0800 |
User-agent: |
G2/1.0 |
On Feb 28, 3:16 am, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> Robert Thorpe wrote:
<snip>
> > I don't know anything about this code, but what is shown here is a
> > rather common lisp error.
>
> > The function nero-follow-numbers is used in a macro. This macro is
> > used in the file/compilation block nero.elc.
> > The bytecompiler works on a per file basis. It compiles each of the
> > defuns to bytecodes completing it's actions once the file is
> > finished. Macros though must be expanded when the code is being read,
> > at this stage the defuns in the file have not yet been finalised.
>
> > This works fine for the normal evalutator because it finalises and
> > installs a function at the end of the defun form.
>
> > This is why "eval-and-compile" is needed.
>
> A cleaner design would be for the macro to return a form that contains a
> call to the function, rather calling the function during macro expansion
> to generate the returned form.
Yes, but that depends on what the function does, if it does a
significant amount of computation then running it only at
macroexpansion time will make the program faster.
- Re: Can't compile, (continued)
- Re: Can't compile, Robert Thorpe, 2007/02/26
- Re: Can't compile, Kevin Rodgers, 2007/02/27
- Message not available
- Re: Can't compile,
Robert Thorpe <=