[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: email@example.com
- Subject: Package Odor
- From: Dan Hoey <firstname.lastname@example.org>
- Date: Fri, 12 Feb 1988 14:22:00 -0000
- Cc: RWK@AI.AI.MIT.EDU, hilfingr%tully.Berkeley.EDU@UCBVAX.BERKELEY.EDU, common-lisp@SAIL.STANFORD.EDU, CL.BOYER@R20.UTEXAS.EDU, edsel!jonl@LABREA.STANFORD.EDU, labrea!CL-Cleanup%SAIL@LABREA.STANFORD.EDU, labrea!KMP%STONY-BROOK.SCRC.Symbolics.COM@LABREA.STANFORD.EDU
Date: Thu, 11 Feb 88 19:26 est
...My experience is that no one wants to qualify any names so what
they do is carefully use every package that they've ever seen,
not realizing that
(let ((string "abcd"))
in their code is creating a spec-bind because they are using a package
where string is a special....
Note that this is not *quite* the problem, since STRING is a symbol in
the LISP package, and anyone who is using random packages must surely
use LISP. In that case it is the error of the other package in
proclaiming a symbol of the LISP package SPECIAL (or CONSTANT), and you
couldn't defend against the error by not using that package.
That this is an error should be made explicit--I once broke the
compiler by proclaiming LISP:FUNCTION constant, and the compiler wanted
to bind it in a macroexpansion. Making it SPECIAL might have screwed
things up beyond hope of diagnosis.
The problem of using every package is still there, though. You should
know the names of all the symbols you import (including all the symbols
exported from packages you use), not only so you don't get surprised
about them being special, but so you don't accidentally make them
special when they shouldn't be. What the package system buys you is
letting this not be all the symbols in the world.
- Package Odor
- From: Jon L White <edsel!jonl@labrea.Stanford.EDU>