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

time of evaluation



    Date: Tue, 14 Jan 86 15:17 EST
    From: Soley@MIT-MC.ARPA

	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

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.