[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Eval-When -- a radical view
- To: edsel!jonl@labrea.Stanford.EDU
- Subject: Eval-When -- a radical view
- From: mike%acorn@oak.lcs.mit.edu (mike@gold-hill.com after 1-April-88)
- Date: Wed, 30 Mar 88 09:15 est
- Cc: Rob.MacLachlan@wb1.cs.cmu.edu, sandra@cs.utah.edu, cl-compiler@sail.stanford.edu
- Comments: NOTE %acorn@oak... CHANGES TO @GOLD-HILL.COM ON 1-April-88
I searched through our system sources looking for all uses of
EVAL-WHEN.
Nearly all uses involved one of two situations lists:
(COMPILE LOAD EVAL)
(COMPILE EVAL)
In our implementation, the most common situation for eval-when is
(compile eval). This is used to exclude macros, constants, etc that
are compiled in to a delivered system. Another common one is
(load eval), which is used within expansions of macros to force loading
of runtime support: e.g.,
(defmacro mac (....)
`(progn
(eval-when (load eval) (require "runtime-support"))
...rest of expansion here....))
This is nice because in the file header you only have to require the
module that defines the macros, via:
(eval-when (compile eval) (require "the-macros")) You don't have to
know where the runtime support lives, or use autoloading or anything.
There are almost no uses of (compile eval load) anywhere.
I am of the opinion that we should define what EVAL-WHEN does, and
not chuck it out in favor of new constructs, like EVAL-EARLY, etc.
...mike beckerle