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

Re: 4.2

> The term source code is used to refer to two things:
> * the {\word objects\/} constructed by {\function compile-file\/}
> corresponding to the objects that READ would have produced on the
> same input
> * additional {\word objects\/} constructed by macroexpansion during
> {\function compile-file\/}.

This is a lot better than what's there now, but I still prefer the
original wording.

> The reason I object to explicit use of READ is that there are
> legitimate Common Lisp environments in which there is no such thing as
> character-level source code (printed representation). Such an
> environment would use abstract syntax trees to represent source code,
> and only during printing would anything like an ascii representation
> be available. These syntax trees can be grouped into files, and
> COMPILE-FILE makes sense on them, but it is senseless to translate
> into ascii so that READ can be used.  (Sadly READ is specified to take
> printed representation.)

I don't think this is a problem.  Every conforming implementation must
have a notion of files which contain characters and be able to READ
from those files.  I don't think that requiring COMPILE-FILE to be
able to READ these files is a great hardship on implementations that
also happen to support files containing source code in some other
structured representation.  Of course, these implementations would
probably also want to extend COMPILE-FILE to also accept the
structured input files.

> This has nothing to do with cross-compilation, per se. The issue is
> that we need to state something about where the compiler can assume
> the compiled code will run. Since we are outlining things the compiler
> can assume, this seems like an obvious thing to discuss. The two choices
> about what to say are:
> 1. It is assumed the code will be immediately loaded into the very image
> the compiler that was just used is in.
> 2. A fresh copy of the above image.

There is a third choice which I think is probably more correct: the
code can be loaded into either of the above.

I think the use of the word "fresh" in choice number 2 might have the
wrong connotations here.  To me it implies a completely clean
environment containing nothing but the symbols and definitions that
are initially provided by the implementation.  I think that what you
really want to say is that the copy *might* be a fresh copy, but leave
open the possibility that it could contain other user-supplied
definitions as well (for example, as a result of previously loading
some other files).  Likewise, I would strike the word "immediately"
from choice number 1.

> The point is that if there is a statement in the compiler section
> about CL semantics, and the same statement is true of the interpreter,
> then the statement is about the language and belongs somewhere besides
> the compiler section.

You're probably right -- chapter 4 could be reorganized to present the
evaluation model in terms of two distinct phases (syntactic analysis
and execution) and this entire discussion about implicit compilation
and which phase various things happen in moved there, and what is now
section 4.2 should probably concentrate only on aspects of compilation
that are peculiar to COMPILE-FILE.  I don't think I've got authority
to do that on my own (it's certainly beyond the scope of what Kathy
originally asked me to do), but I guess that's the kind of decision 
you guys on the drafting committee are supposed to be making.

> Since this is exactly your message of April 25 except for the word
> ``compatible'', you must be asking about that word. First, note that
> my comment says ``compatible metaclass?'' whilst your original said
> ``same ... metaclass.'' My question is whether we want to restrict the
> metaclass to be the same or is it allowed to be some simpler one?

I understand what you meant by using "compatible" here.  My question
is, is this new wording you suggest something that you would prefer to
the amendment that was offered at the last meeting (which said
something quite different), and is that your own personal opinion or
are you speaking for the CLOS cabal?  To tell the truth, I think that
amendment is going to open up a can of worms and I'd really like to
find some other compromise position.