unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: "Eli Zaretskii" <eliz@gnu.org>,
	66706@debbugs.gnu.org,
	"Mattias Engdegård" <mattias.engdegard@gmail.com>,
	stefankangas@gmail.com
Subject: bug#66706: [PATCH] Automatic elisp dialect insertion
Date: Tue, 24 Oct 2023 22:01:25 -0400	[thread overview]
Message-ID: <jwvpm13xz2s.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87pm131pq6.fsf@yahoo.com> (Po Lu's message of "Wed, 25 Oct 2023 08:59:45 +0800")

> I want this off by default.  We teach users to enable lexical binding in
> the Lisp introduction and a myriad of other places; inserting lexical
> binding cookies is not "the icing on the cake", but a gesture that
> implies we should override the judgement of our users, and are willing
> to browbeat them into abiding by such notions of ours.

The lexbind dialect is the dialect we recommend:

    Lately Emacs is moving towards using lexical binding in more and
    more places, with the goal of eventually making lexical binding the
    default.  In particular, all Emacs Lisp source files and the
    @file{*scratch*} buffer use lexical scoping.

So why should a new file default to using the dynbind dialect instead?

> Similar measures taken by other software bespeaks the existence of a
> sense of superiority in their developers; doubtless,

We simply can't satisfy everyone: either we impose the dynbind
dialect by default (the current situation) or we impose the lexbind
dialect by default.  In both cases you can look at it as something
imposed out of a sense of superiority, but I don't think that is
a useful way to look at it.

> they think it beyond their users to read several pages of
> documentation pertaining to lexical binding, and to make from that an
> informed decision.

Those users who read all the docs can easily turn that option off if
they so wish.  We shouldn't decide on what's a good defaults based
on them.

> We never insert text to enforce our conceptions of good practice in any
> major mode.  Such is the first step down a very precipitous slope, which
> culminates in the adoption of the haughty attitude that other software
> has seized upon with particular zeal.

Just to be clear: the long term goal is to eliminate the dynbind
dialect, or at least make it be an opt-in that requires taking extra
steps, such as adding a cookie to the file, whereas the lexbind dialect
should be the default.  Not because dynbind is evil.  Not because it
imposes an undue burden on the implementation.
But because having two dialects imposes an undue burden on our users.
Those who read all the docs may not care, but all the others are
vulnerable to the usual "I copied the code from that webpage and it
doesn't work" because the code on that webpage used the other dialect.

So the question is how to move from here to there in the least
painful way and I believe that inserting this cookie by default is a step
that will make this transition less painful.


        Stefan






  parent reply	other threads:[~2023-10-25  2:01 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 17:46 bug#66706: [PATCH] Automatic elisp dialect insertion Mattias Engdegård
2023-10-23 18:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-23 18:44 ` Eli Zaretskii
2023-10-23 19:21   ` Stefan Kangas
2023-10-23 20:20     ` Mattias Engdegård
2023-10-24 17:31     ` Mattias Engdegård
2023-10-24 18:25       ` Eli Zaretskii
2023-10-24 19:19         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-24 20:22           ` Stefan Kangas
2023-10-25  2:31             ` Eli Zaretskii
2023-10-25 11:56               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 12:17               ` Stefan Kangas
2023-10-25 12:54                 ` Dmitry Gutov
2023-10-26  0:31                   ` Michael Heerdegen
2023-10-26  6:35                     ` Eli Zaretskii
2023-10-27  3:14                       ` Michael Heerdegen
2023-10-27  6:26                         ` Eli Zaretskii
2023-10-27  7:24                           ` Michael Heerdegen
2023-10-27  7:32                             ` Eli Zaretskii
2023-10-27 14:41                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-29 12:26                             ` Eli Zaretskii
2023-10-25  0:59           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25  1:20             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25  2:01             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-10-25  3:01               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 11:48                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 12:46                   ` Dmitry Gutov
2023-10-25 12:48                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 14:56                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 16:04                       ` Eli Zaretskii
2023-10-26  0:01                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 12:03               ` Eli Zaretskii
2023-10-25 13:06                 ` Dmitry Gutov
2023-10-25 13:20                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 13:40                     ` Dmitry Gutov
2023-10-26  0:07                     ` Jim Porter
2023-10-26  0:40                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26  0:51                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26  1:19                         ` Jim Porter
2023-10-26  1:41                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26  3:48                           ` Jim Porter
2023-10-26  5:56                             ` Jim Porter
2023-10-26  7:09                             ` Eli Zaretskii
2023-10-26  2:37                         ` Drew Adams
2023-10-26  2:28                       ` Drew Adams
2023-10-26  5:21                       ` Eli Zaretskii
2023-10-25 13:57                   ` Eli Zaretskii
2023-10-25 15:11                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 16:08                   ` Eli Zaretskii
2023-10-25 16:10                     ` Dmitry Gutov
2023-10-25 16:20                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26  0:02                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-25 18:19                     ` Mattias Engdegård
2023-10-25 18:40                       ` Eli Zaretskii
2023-10-25 19:09                         ` Mattias Engdegård
2023-10-25 23:43                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26  0:07                           ` Jim Porter
2023-10-26  2:34                             ` Drew Adams
2023-10-26  3:56                               ` Jim Porter
2023-10-26  5:22                             ` Eli Zaretskii
2023-10-26  6:31                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26 13:54                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26 14:02                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26 15:35                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-26  8:32                             ` Mattias Engdegård
2023-10-26 11:39                               ` Nikolay Kudryavtsev
2023-10-26 15:36                                 ` Drew Adams
2023-10-25 12:36               ` Nikolay Kudryavtsev
2023-10-25 12:48                 ` Dmitry Gutov
2023-10-26 11:06                   ` Nikolay Kudryavtsev
2023-10-25  2:27           ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwvpm13xz2s.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66706@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=mattias.engdegard@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefankangas@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).