Re: Symbol clashes: how to avoid them. Part 2
- From: Kaz Kylheku <kkylheku@xxxxxxxxx>
- Date: Fri, 31 Oct 2008 19:36:42 +0000 (UTC)
On 2008-10-31, budden <budden01@xxxxxxxxxx> wrote:
Hi Group!
This topic originates from the following discussion:
You have overlooked one serious problem with USE-PACKAGE and its ilk.
Suppose that you are using two packages A and B, which happen to be
conflict-free.
The A package exports a function called FOO which you use by
its unqualified symbol.
Now a new version of both A and B comes out. It so happens that A:FOO is
removed from A (or no longer exported), and at the same time,
a new symbol B:FOO appears in B, also naming a function.
Your package use of A and B is still conflict-free. But now, your code
is calling the wrong FOO. No diagnostic is produced.
So you see, carelessly inheriting from multiple namespaces is dangerous and
stupid.
Handpicking symbols is the way to go, if you want to get it right, and in a way
that is future-proof.
(:shadowing-import-from :a :foo)
will blow up if FOO disappears from A. And it won't pick up any new symbols
that have appeared in a new revision of A.
.
- References:
- Symbol clashes: how to avoid them. Part 2
- From: budden
- Symbol clashes: how to avoid them. Part 2
- Prev by Date: Re: Symbol clashes: how to avoid them. Part 2
- Next by Date: Re: Growing a data type?
- Previous by thread: Re: Symbol clashes: how to avoid them. Part 2
- Next by thread: (setf slot-value-using-class) not working ...
- Index(es):
Relevant Pages
|