[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Package problem
Date: Thu, 5 Apr 90 14:41 PDT
From: larry@atc.boeing.com (Larry Baum)
I have run into the following behavior which is annoying. We have a
system that we are maintaining for both Symbolics and Explorers, so we
do:
(in-package (find-package 'tv) :nicknames '(w))
Pardon my ignorance, I haven't worked on Explorers in a while (for obvious
reasons). Is their window system package named W? If TV is a valid name for
their window package, you could leave off the nickname with no ill effects.
Now if this is loaded and we are working on something else and we write
code that references the TV package (e.g. (setq my-window
(tv:make-window ...) and then save and compile the file, the compiled
file references the "W" package. If we then try to load the compiled
file on a different machine or world where we haven't created the W
nickname, we get an error saying that W is an undefined package.
Keep in mind that nowhere in the source code is there a reference to W:,
i.e. this is just an undesired side effect of loading our system. Why
does the compiler change referneces to the TV package to refernces to
the W package?
Thanks
Larry Baum
larry@atc.boeing.com
Because the printer and the binary dumper always refer to packages by their
shortest nicknames, in this case W. I believe this is true of both brands of
Lispm. Thus it would not seem wise to specify nicknames in IN-PACKAGE forms.
When writing portable code, one must always use the lowest common denominator,
unless one is willing to define the extensions themselves.
-- Chuck Fry
Symbolics Software Support