emacs-devel
[Top][All Lists]
Advanced

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

Re: The purpose of makunbound


From: Kelly Dean
Subject: Re: The purpose of makunbound
Date: Wed, 18 Feb 2015 08:51:41 +0000

Stefan Monnier wrote:
>> What's the use case of doing makunbound on a dynamically let-bound variable?
>
> What's the use case for disallowing it?

Catching errors. If some code F does makunbound on a symbol that it assumes is 
currently used as the global variable, but F is called from some other code 
that dynamically let-binds the symbol, then F will accidentally set the dynamic 
variable to the special unboundedness value rather than unbind the global 
variable.

If that's a bogus thing to do, then by disallowing it, the interpreter could 
catch the error. But if there's a legitimate use case for it, then of course it 
must be allowed. Is there one?



reply via email to

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