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

"include" revisited



Some time ago I posted a message to this mailing list concerning the lack of
an "include" or file indirection construct in CL.  (The primary motivation
for having such a construct being the lack of any other way to compile
several source files into a single binary file.)  It was pointed out that
this could be written as a macro (which reads in the entire contents of the
include'd file and returns it inside a PROGN), and that was the end of the
discussion.

Just now, however, I happened to come across the implementation note on
p.182 in CLtL, which states that it's wrong for a compiler to read in the
entire file before processing any of the forms because of the presence of
multiple packages.  So, "include" can't be implemented correctly in this
way either.  Rather than introduce a special form for "include", how about
extending the syntax of compile-file to accept either a single input-pathname
or a list of pathnames?

-Sandra
-------