[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: When should eval-when eval?
From: |
Marius Vollmer |
Subject: |
Re: When should eval-when eval? |
Date: |
16 May 2001 09:30:39 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102 |
Rob Browning <address@hidden> writes:
> My assumption would be
>
> compile - forms are executed when the code is compiling.
and the eval-when form is on top-level
> load - forms are executed when the shared library is loaded.
and the eval-when form is on top-level
> eval - forms are executed when the code is actually executed.
and the eval-when form is not on top-level
> Also, what should the semantics of eval-when be for top vs
> non-top-level forms. For example, should top-level forms not
> protected by eval-when be evaluated at compile time? eval time? load
> time?
No, no, and yes.
> I've actually been looking at the CL documentation a bit, but on that
> topic it makes my brain hurt a bit. I'll go back and review it again
> later. I may also try to wade through the chapter on compilation in
> general.
Yes, I think we should follow Common Lisp in this regard.