[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: 12 Feb 1988 10:22:34 EST (Fri)
- Cc: RWK@ai.ai.mit.edu, hilfingr%tully.Berkeley.EDU@ucbvax.berkeley.edu, email@example.com, CL.BOYER@r20.utexas.edu, firstname.lastname@example.org, 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.