[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
time of evaluation
- To: Soley@MIT-MC.ARPA, LOOSEMORE@UTAH-20.ARPA, common-lisp@SU-AI.ARPA
- Subject: time of evaluation
- From: Bernard S. Greenberg <BSG@SCRC-STONY-BROOK.ARPA>
- Date: Wed, 15 Jan 86 09:11 EST
- In-reply-to: <860114151755.6.SOLEY@MIT-CHERRY.ARPA>
Date: Tue, 14 Jan 86 15:17 EST
Date: Mon 13 Jan 86 18:08:50-MST
From: SANDRA <LOOSEMORE@UTAH-20.ARPA>
Subject: time of evaluation
Should types defined via deftype and defstruct be entered into the type
structure at compile time as well as load/eval time?
Definitely yes. Although the book may not say so, it would be pretty
bad for the compiler to not recognize (and perhaps open-code accessors
of) a type previously defined in the same file.
Along similar lines, I assume one has to wrap an eval-when around
defstructs if one wishes to use #s syntax later on in the file to
create a constant structure, so that the constructor function required
for reading in the constant will be defined at compiletime.
I think DEFSTRUCT should be "implicitly" eval-when (eval compile load),
for the same reasons as above. This is what Gold Hill GCLisp and others
do, for example.
-- Richard Soley
This is completely unclear. Consider an incompatible change to a defstruct
used by the compiler. Consider that one of the accessor functions is passed
as a funarg by the compiler. Doing this would break the compiler. It has
to do something a lot more subtle, that limits its effects to functions being
compiled in the same file.