TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


Forums >


Re: makunbound under dynamic binding

Barry Margolin

6/11/2016 2:36:00 PM

In article <87twh19cxe.fsf@kuiper.lan.informatimago.com>,
"Pascal J. Bourguignon" <pjb@informatimago.com> wrote:

> I would note that MAKUNBOUND is specified to work on a SYMBOL, not on
> some binding. Therefore I'd rather ensure that all the current bindings
> in the current thread whether shadowed or not, be unbound by makunbound.
> I'd expect ((NIL NIL) NIL).
> On the other hand, the concensus result is probably the best, to avoid
> dire bugs. It allows you to protect the bindings to a symbol with a
> dynamic LET binding.

This is the way it has worked since the days of Maclisp, and probably
even Lisp 1.5. There was no plan to change it in Common Lisp, although
it looks like the specification didn't make the intent clear.

CLTL makes it clearer:

It is also possible to establish a bindog of a special variable and then
cause *that binding* [emphasis mine] to be valueless by using the
function MAKUNBOUND. In this situation the variable is also said to be
"unbound," although this is a misnomer: precisely speaking, it is bound
but valueless.

Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***