all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Default lexical-binding to t
Date: Wed, 6 Nov 2024 17:42:29 +0000	[thread overview]
Message-ID: <ZyuqhXeHlcD5L7bO@MAC.fritz.box> (raw)
In-Reply-To: <jwvh68kv0vo.fsf-monnier+emacs@gnu.org>

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



  parent reply	other threads:[~2024-11-06 17:42 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 12:55 Default lexical-binding to t Stefan Monnier
2024-11-01 14:42 ` Gerd Möllmann
2024-11-01 17:03 ` Karl Fogel
2024-11-02 10:48 ` Visuwesh
2024-11-02 12:08   ` Eli Zaretskii
2024-11-02 13:21     ` Visuwesh
2024-11-02 16:24   ` Stefan Monnier
2024-11-02 20:42     ` Jim Porter
2024-11-02 21:38       ` Stefan Kangas
2024-11-03  2:32         ` Stefan Kangas
2024-11-03 13:58           ` Stefan Monnier
2024-11-03 14:34             ` Stefan Kangas
2024-11-04  8:35             ` Jean Louis
2024-11-04  8:43               ` tomas
2024-11-03  1:46       ` Stefan Monnier
2024-11-03  2:30         ` Stefan Kangas
2024-11-03  7:47         ` Jim Porter
2024-11-03 13:53           ` Stefan Monnier
2024-11-03  6:44       ` Sean Whitton
2024-11-03 14:59         ` lexical-binding in paredit Stefan Monnier
2024-11-03 18:32           ` Stefan Kangas
2024-11-03 21:44             ` Taylor R Campbell
2024-11-04  1:54               ` Stefan Monnier
2024-11-03 15:26 ` Default lexical-binding to t Andrea Corallo
2024-11-07  3:46   ` Richard Stallman
2024-11-07 23:00     ` Andrea Corallo
2024-11-08 15:53       ` Sebastián Monía
2024-11-08 16:23         ` Eli Zaretskii
2024-11-08 17:28           ` Sebastián Monía
2024-11-08 17:37             ` Joost Kremers
2024-11-08 18:51             ` Eli Zaretskii
2024-11-08 20:18               ` Sebastián Monía
2024-11-08 20:57                 ` [External] : " Drew Adams
2024-11-11  5:13             ` Richard Stallman
2024-11-04  5:34 ` Richard Stallman
2024-11-04  9:39   ` Po Lu
2024-11-04 13:19     ` Eli Zaretskii
2024-11-04 17:06     ` Alfred M. Szmidt
2024-11-04 18:24       ` [External] : " Drew Adams
2024-11-06  4:44       ` Richard Stallman
2024-11-07 23:07     ` Andrea Corallo
2024-11-04 12:51   ` Eli Zaretskii
2024-11-05 20:24     ` Stefan Monnier
2024-11-06 12:11       ` Eli Zaretskii
2024-11-06 12:50         ` Stefan Monnier
2024-11-06 13:36           ` Eli Zaretskii
2024-11-06 16:32             ` Stefan Monnier
2024-11-06 17:20               ` Eli Zaretskii
2024-11-06 17:42               ` Alan Mackenzie [this message]
2024-11-06 20:48                 ` Joost Kremers
2024-11-06 22:50                   ` Alan Mackenzie
2024-11-07  0:46                     ` Stefan Kangas
2024-11-07 21:03                       ` Alan Mackenzie
2024-11-08  0:44                         ` Stefan Kangas
2024-11-10  4:04                         ` Richard Stallman
2024-11-07  6:14                     ` Eli Zaretskii
2024-11-07  8:07                       ` Joost Kremers
2024-11-07  8:45                         ` Eli Zaretskii
2024-11-07 11:09                           ` tomas
2024-11-07 21:23                       ` Alan Mackenzie
2024-11-07 22:37                         ` Dmitry Gutov
2024-11-08  6:58                         ` Eli Zaretskii
2024-11-08 14:01                           ` Alan Mackenzie
2024-11-08 15:19                             ` Eli Zaretskii
2024-11-08 19:07                               ` Alan Mackenzie
2024-11-08 20:01                                 ` Stefan Monnier
2024-11-07 22:10                     ` Andrea Corallo
2024-11-08 18:38                     ` Stefan Monnier
2024-11-07  2:55                 ` Sean Whitton
2024-11-06 17:54       ` Jim Porter
2024-11-06 19:26         ` Stefan Monnier
2024-11-06 20:23           ` John Yates
2024-11-08 18:43             ` Stefan Monnier
2024-11-06 19:53         ` Jose A. Ortega Ruiz
2024-11-08 18:42           ` Stefan Monnier
2024-11-07  3:46     ` Richard Stallman
2024-11-07  7:09       ` Eli Zaretskii
2024-11-07  3:46     ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2024-11-07 22:28 Christopher Howard
2024-11-08  0:38 ` Stefan Kangas
2024-11-08  6:29   ` tomas
2024-11-10  4:04     ` Richard Stallman
2024-11-08  7:27   ` Eli Zaretskii
2024-11-08 12:11     ` Stefan Kangas
2024-11-08 13:12       ` Suhail Singh
2024-11-08 13:24         ` Stefan Kangas
2024-11-08 13:45       ` Eli Zaretskii
2024-11-08  7:01 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZyuqhXeHlcD5L7bO@MAC.fritz.box \
    --to=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.