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

READ loses info as to whether package is specified or not, my fix



  |Date:  8-Apr-85 18:03:48
  |Subject: Compilation and package system
  |From: perdue%hplabs.csnet@csnet-relay.arpa

  |It is surprising to me that there has not been discussion of
  |the problems of compiling when there is a package system.
  |The specific problem I have in mind is in the handling of
  |symbols that are referred to in the input text without a package
  |qualifier.
  |
  |The user of a Common LISP implementation sees the problem as a
  |difference between the behavior of a module (file) loaded in its
  |interpretive form and loaded in its compiled form.  Specifically,
  |references to symbols will in some cases be resolved differently
  |depending on whether or not the file was compiled before being loaded.

I agree, this may indeed be a serious problem. I think the answer is
to flush the idea that any piece of LISPish text must run exactly the
same interpreted and compiled, and rather say that any correct LISP
program must run the same interpreted and compiled. We define a file
without an IN-PACKAGE at the beginning to NOT be a correct LISP
program. Thus it may still work interpreted, and compiled, although
differently, but the compiler should flag as an warning that it is not
a valid LISP program and might not execute as expected (as it did
interpreted).