[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lexical-binding is turned on in more use cases
From: |
Alan Mackenzie |
Subject: |
Re: lexical-binding is turned on in more use cases |
Date: |
Tue, 10 Mar 2020 21:02:11 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Stefan.
On Tue, Mar 10, 2020 at 16:41:43 -0400, Stefan Monnier wrote:
> > What specific real problem does forcing M-: to use lexical binding solve?
> Make it behave the way coders who use lexical-binding (which I believe
> are now the majority) expect.
So, you admit there is no specific problem solved by forcing lexical
binding in M-:?
Lexical binding is useless for M-:. It can't do anything useful.
Unless (contrived example) somebody is going to type in the code for
creating a closure into the minibuffer. Or something like that. Is
this really why you want to force lexical-binding in M-:?
I would think that ALL emacs coders, whether working with
lexical-binding nil or t, would expect to be able to bind a dynamic
variable, any dynamic variable, in a let form in M-:
> You likely won't write code that relies on lexical scoping since you're
> used to writing dynamically scoped code, but many coders nowadays never
> touch dynamically scoped code and hence very much expect the lexical
> binding rules, which is mostly the ability to use closures (which is
> sometimes present only implicitly via macros like `gv-ref` (itself used
> in other macros like `add-function`), thunk.el and generator.el macros,
> ...).
So, what we need here is a customisation variable, so that people who
want lexical binding in M-: can have it, and those who want dynamic
binding can also have that. Agreed?
I'll code it up.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
- Re: lexical-binding is turned on in more use cases, (continued)
- Re: lexical-binding is turned on in more use cases, John Wiegley, 2020/03/09
- Re: lexical-binding is turned on in more use cases, Alan Mackenzie, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Andrea Corallo, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Alan Mackenzie, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Andrea Corallo, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases,
Alan Mackenzie <=
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Eli Zaretskii, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Alan Mackenzie, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Noam Postavsky, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Michael Heerdegen, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Noam Postavsky, 2020/03/12
- Re: lexical-binding is turned on in more use cases, Richard Stallman, 2020/03/10
- Re: lexical-binding is turned on in more use cases, Stefan Monnier, 2020/03/11