GNU bug report logs -
#66706
[PATCH] Automatic elisp dialect insertion
Previous Next
Full log
Message #199 received at 66706 <at> debbugs.gnu.org (full text, mbox):
> 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
This bug report was last modified 1 year and 238 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.