[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Default lexical-binding to t
From: |
Alan Mackenzie |
Subject: |
Re: Default lexical-binding to t |
Date: |
Wed, 6 Nov 2024 17:42:29 +0000 |
Hello, Stefan.
On Wed, Nov 06, 2024 at 11:32:10 -0500, Stefan Monnier wrote:
> >> They should likely add a `lexical-binding:nil` cookie and move on.
> > In each and every file?
> Yup.
> > Not a simple thing to do.
> It doesn't require any thought, so I consider it simple.
> Also, there shouldn't be so terribly many such files remaining nowadays.
> But if experience shows it to be a problem, I guess we could provide
> a command that automates it.
> >> Of course, they can also change this cookie to `t` temporarily every
> >> once in a while to see if it uncovers a problem or not, so the
> >> conversion can be done bit by bit.
> > For some code that gets executed only rarely, this is not practical.
> I don't see why.
> > Can you tell what are the benefits of turning on lexical-binding by
> > default, relative to what we have now?
> IME, nowadays lexbind is the "de facto" default used for all
> new ELisp code, including code snippets posted around the web.
> So using dynbind when there's no cookie is often a source of errors
> and confusion.
Maybe briefly explaining the philosophy of lexical binding somewhere
(maybe NEWS) would help.
I still don't understand it. I go along with lexical binding because
quite a lot of people cleverer than me have said it is good. But why?
It doesn't seem to make code run faster (I think CC Mode became
marginally slower after the conversion to lexical binding). OK, we can
create closures, but so what? What user features in Emacs have become
possible, or practical, because of lexical binding?
I'm not trying to be argumentative here. I'm just puzzled about it, as
I have been for quite a number of years.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
- RE: [External] : Re: Default lexical-binding to t, (continued)
- Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/04
- Re: Default lexical-binding to t, Stefan Monnier, 2024/11/05
- Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/06
- Re: Default lexical-binding to t, Stefan Monnier, 2024/11/06
- Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/06
- Re: Default lexical-binding to t, Stefan Monnier, 2024/11/06
- Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/06
- Re: Default lexical-binding to t,
Alan Mackenzie <=
- Re: Default lexical-binding to t, Joost Kremers, 2024/11/06
- Re: Default lexical-binding to t, Alan Mackenzie, 2024/11/06
- Re: Default lexical-binding to t, Stefan Kangas, 2024/11/06
- Re: Default lexical-binding to t, Alan Mackenzie, 2024/11/07
- Re: Default lexical-binding to t, Stefan Kangas, 2024/11/07
- Re: Default lexical-binding to t, Richard Stallman, 2024/11/09
- Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/07
- Re: Default lexical-binding to t, Joost Kremers, 2024/11/07
- Re: Default lexical-binding to t, Eli Zaretskii, 2024/11/07
- Re: Default lexical-binding to t, tomas, 2024/11/07