[Top][All Lists]

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

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

From: Drew Adams
Subject: RE: [External] : Re: Closures in Emacs and their usage scenarios.
Date: Thu, 30 Sep 2021 14:55:23 +0000

> >> 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.

Oh, so you really meant that closures don't fit
well with a language that has _only_ dynamic binding.

That's different.  Thanks for clarifying.

reply via email to

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