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

Re: Function constants

> Date: Tue, 25 Apr 89 19:24:00 PDT
> From: Richard P. Gabriel <rpg@lucid.com>
> It is easy to imagine a programming environment in
> which recompilation of all required definitions is done whenever a
> macro changes.

Hmmm.  That seems like a programming environment issue, except that
the current version of issue COMPILE-ENVIRONMENT-CONSISTENCY (which we
haven't voted on yet) effectively says that macro definitions don't
affect code once it has been compiled.  I think such a programming
environment would be a legitimate extension if users had to set a
magic switch to get this behavior, though. 

> So, should we include structuring information? If so, should we only
> worry about which definitions should appear before which others?

I admit to being rather partial to the way this is now handled in the
draft of section 4.2 I've been working on.  It talks about what kind
of information is needed by the compiler in the subsection on
compilation semantics, and then the subsection on file compilation
talks about what constructs make information available to the compiler
during processing by COMPILE-FILE.  In other words, we've specified a
requirement on implementations.  I've kind of been assuming that the
behavior of conforming programs is covered under the part of the
conformance language that says that conforming programs have to depend
on the semantics of the language as described in the standard, and
that no additional requirements on conforming programs were necessary
as far as compilability is concerned.

> What do we say about recursive loads and compiles? 

I think it ought to be allowed and therefore we don't need to say
anything.  (I suspect a couple of implementations probably break if
COMPILE-FILE is invoked recursively, but I think that's a bug.)

> Presumably the
> Lisp-symbol-redefinition covers some bad case; what about readtables
> and packages? (I guess something is already said about packages.)

I'm not sure exactly what aspects of readtables and packages you're
referring to here.  My writeup for section 4.2 does explicitly mention
manipulation of *READTABLE* and *PACKAGE* as situations where
EVAL-WHEN is useful for making sure that COMPILE-FILE reads the input
file properly, though. 

> Should we worry about loading compiled files into images in which
> compilation already happened, or should we state that we can only
> guarantee semantics in the fresh Lisp case?

I don't think there's any problem with specifying the semantics of
loading compiled files into "non-fresh" images.  Do you have some
particular aspect in mind that you think is not well-specified? 

> What is the resolution of function constants?

Well, unless somebody writes up another proposal, we're stuck with
and EVAL but the behavior of COMPILE-FILE is unspecified.