[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66706: [PATCH] Automatic elisp dialect insertion
From: |
Drew Adams |
Subject: |
bug#66706: [PATCH] Automatic elisp dialect insertion |
Date: |
Thu, 26 Oct 2023 15:36:23 +0000 |
> Dynamic binding allows you to tweak some behavior when you have to
> conform to an existing API, even when it has not been properly designed
> to to support your use case. We just don't know how much 3rd party code
> uses it in this perfectly valid way and refactoring those mature API to
> support even some of the use cases like that may not be realistically
> doable or worth it in the first place.
I believe this discussion is not about dynamic
binding as such; it's about having the default
be lexical binding.
That is, it's about having, by default, the
behavior you get with lexical-binding=nil.
That doesn't prevent any use of dynamic binding.
What it does is make Elisp behave like Common
Lisp wrt lexical/dynamic: It makes lexical
binding the _default_; nothing more. To get
dynamic binding for something you need to tell
Lisp that it's "special".
And yes, everything you said about dynamic
binding is correct: it is extremely useful, in
particular for an application such as Emacs.
But wrt that there should be no special need
to refactor anything. The problem (need for
rewriting/refactoring) is code for code that
expects or depends on dynamic binding by
default.
Long ago RMS summarized the special advantages
dynamic binding offers for an app such as Emacs:
https://www.gnu.org/software/emacs/emacs-paper.html#SEC17
https://www.gnu.org/software/emacs/emacs-paper.html#SEC18
- bug#66706: [PATCH] Automatic elisp dialect insertion, (continued)
- bug#66706: [PATCH] Automatic elisp dialect insertion, Eli Zaretskii, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion, Po Lu, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion, Stefan Monnier, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion, Po Lu, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion, Stefan Monnier, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion, Mattias EngdegÄrd, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion, Nikolay Kudryavtsev, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion,
Drew Adams <=
- bug#66706: [PATCH] Automatic elisp dialect insertion, Nikolay Kudryavtsev, 2023/10/25
- bug#66706: [PATCH] Automatic elisp dialect insertion, Dmitry Gutov, 2023/10/25
- bug#66706: [PATCH] Automatic elisp dialect insertion, Nikolay Kudryavtsev, 2023/10/26
- bug#66706: [PATCH] Automatic elisp dialect insertion, Eli Zaretskii, 2023/10/24