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

Function constants

    Date: Tue, 25 Apr 89 08:58:22 PDT
    From: Richard P. Gabriel <rpg@lucid.com>

    I believe that there are some scenarios in which EVAL and COMPILE-FILE
    have the same behavior. My question (it's actually a question, not a
    disguised contention) is whether these scenarios can be captured with
    a simple description, and if so whether that description is
    unrestrictive enough.

    For example, the description I propose is:

    1. A well-formed compilation unit has all type and macro definitions
    first, then all function definitions, and then all executable expressions.

    2. You must use a fresh Lisp when compile-filing, and you cannot
    invoke load or anything but trivial (or *no*) EVAL-WHEN's.

    3. You must load a compile-filed file into a fresh copy of the same Lisp.

    If you do these, the semantics of EVAL and compile-file on that compilation
    unit is the same (?).

But the argument to EVAL is a form, not a file.  So I don't see how you can
even begin to compare the two.  There is no concept of compilation units
when dealing with EVAL.  I don't think I'm just obnoxiously nitpicking
here, although maybe there is a different way to say what you're saying that
will straighten me out.  Could it be that you not talking about EVAL at all,
but about LOAD, and not talking so much about what Common Lisp programs do
as about how to construct files containing Common Lisp programs?