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

Issue: PACKAGE-DELETION (Version 4)


For the record, I don't really think that
 (DELETE-PACKAGE no-such-name)
should be treated the same as
 (DELETE-PACKAGE unregistered-package)
In the former case, it is not clear what package you are referring
to, so it's not clear which of several bugs you have:
 - The package name might have been mis-spelled.
 - The package might have been supposed to exist, but was never loaded/created.
 - The package might have already been deleted.
In the latter case, there's only one possibility:
 - The package might have already been deleted.

In the case where you're sure you are referring to the correct package
and all you're trying to say is "There is no doubt about the identity
of the package to which I am referring. I would that unambiguously named
package to be inaccessible.", I have no problem about this returning NIL.

In the other case, where any of a number of bugs could have happened,
I'm more comfortable with an error being signalled -- partly for consistency
with your insistance that this function should signal an error rather
than define a useful behavior in the other questionable case: package
already in use. If that didn't cause an error to be signalled, then I
would also not mind quietly returning NIL for the deletion of a package
which does not exist.

I also deliberately did not say that delete package returns T if the
deletion is successful "and otherwise returns NIL" since sometimes it
does not return at all. The usage "and otherwise ..." always implies
and exhaustive case analysis in my mind. The specific cases where NIL
are returned are already cited. I would prefer to just say it returns T
if it was successful and let anyone search the other cases, or else
say something very clumsy like "If DELETE-PACKAGE returns normally,
the value returned is T if the deletion was successful and NIL otherwise."