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

Re: Function constants

This makes sense to me.  However, I should point out that there are
really two sets of constraints on the ordering of forms within a file:
those that apply to LOAD (of the source file), and some additional
constraints that apply to COMPILE-FILE.  

The first set of constraints exists because of the possibility that
the evaluator might always choose to compile forms before executing
them.  This includes things like macro definitions, SPECIAL
proclamations, etc. being available before code that requires them
(including any lexically enclosing FUNCTION special forms) is
executed.  I can't find anything in CLtL that says this explicitly,
but I was hoping to see some stronger language in the standard saying
that conforming programs must be structured in such a way that they
would work in a compiled-only implementation.

The second set of constraints has more to do with the file compilation
model and EVAL-WHEN, and is oriented towards making sure that
definitions appearing within a file that are needed to correctly
compile the rest of the file are made in the compile-time environment
as well as at load time.

We could require both sets of requirements to be fulfilled by
conforming programs, though.  The real question is whether we view the
semantics of Common Lisp as the semantics of programs that can be
compiled with COMPILE-FILE, or whether we view COMPILE-FILE as a kind
of wart on the language that can process only a restricted subset of
conforming programs.  I've always taken the former view, but it
appears that I might be in the minoriy.