help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: [External] : Re: Closures in Emacs and their usage scenarios.


From: Tomas Hlavaty
Subject: RE: [External] : Re: Closures in Emacs and their usage scenarios.
Date: Thu, 30 Sep 2021 12:58:44 +0200

On Wed 29 Sep 2021 at 22:25, Drew Adams <drew.adams@oracle.com> wrote:
>> closures and dynamic binding does not go together well.
>
> Why do you say that?  Can you point to a problem,
> say, with Common Lisp, which was designed to have
> both since its inception?

Maybe I should have been more precise.  There is no problem with Common
Lisp it this regard.  Common Lisp has lexical binding.  Emacs Lisp did
not have lexical binding until recently.  Dynamic variables are not
closed over so you cannot create a closure if your lisp does not have
lexical binding.  There are still such lisps that do support dynamic
bindings only.  Try to create a closure in such Lisp and see the
workarounds.  The point I was trying to make, that closures might not be
used much in Emacs Lisp so far, because lexical binding is rather new
there, not because there are a few use-cases.



reply via email to

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