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

Re: issue COMPILE-FILE-HANDLING-OF-TOP-LEVEL-FORMS



This is a fair summary of current practice, but I would rather push through
a proposal that is more aggressive in defining the exact effects of
compiler processing.

Like Jonl, I favor saying that forms like DEFMACRO are actually truly,
honest to God evaluated by the compiler.  This could be done by an
expansion that includes an EVAL-WHEN, but it should be required that all
Common Lisp semantics of evaluation of that defining form should be present
in the compiler environment after the implicit evaluation.

It could be a bit icky actually installing the DEFSTRUCT slot accessors,
but this could be finessed by pretending that the slot accessors expand to
DEFUNs outside of the EVAL-WHEN.

I strongly, totally, completely disagree with VanRoggen's remarks about
DEFCONSTANT.  From my perspective, the reason for DEFCONSTANT is permissive
rather restrictive.  You define constants so that the compiler can use
information about that name at compile time.  I believe that DEFCONSTANT
should also be implicitly evaluated at compile time.  This means that the
value form *must always* be evaluable at compile time.  This is a slight
departure from current practice, but a sensible and useful one.

  Rob