emacs-devel
[Top][All Lists]
Advanced

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

Re: The purpose of makunbound


From: Stephen J. Turnbull
Subject: Re: The purpose of makunbound
Date: Fri, 20 Feb 2015 11:58:14 +0900

Kelly Dean writes:

 > The implementation does see [the two forms of unbinding] as
 > different,

I don't understand what you mean.  The unbinding is the same, and has
the conventional semantics: this value can no longer be accessed by
that name (== symbol).  Exit from let has *additional semantics* of
restoring the previous binding.

The void or unbound pseudo-value is an implementation detail, useful
in so-called shallow-binding implementations.  You can't observe that
symbol from Lisp without making an end-run around the Lisp engine (eg,
via an FFI).  It's uninterned so it's not possible to find it and then
store it somewhere, and all slot-accessing internal functions check
for it and error if it's found.

 > In contrast, if makunbound didn't work for let-bound or
 > buffer-local variables,

If there's a reason for makunbound in the top-level environment, the
same reason will apply to let-bound environments.  I can't support
your proposal to error on makunbound of let-bound variables.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]