[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

time of evaluation



    Date: Mon 13 Jan 86 18:08:50-MST
    From: SANDRA <LOOSEMORE@UTAH-20.ARPA>
    Subject: time of evaluation
    To: common-lisp@SU-AI.ARPA
    Message-ID: <12175028466.9.LOOSEMORE@UTAH-20.ARPA>

    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