From: Drew Adams <drew.adams@oracle.com>
To: Stefan Kangas <stefan@marxist.se>, emacs-devel@gnu.org
Subject: RE: Recommend lexical-binding in Coding Conventions
Date: Tue, 20 Oct 2020 21:32:03 -0700 (PDT) [thread overview]
Message-ID: <22583ae4-5224-4ad0-9378-8015acb4c38f@default> (raw)
In-Reply-To: <CADwFkmme2jZSOu6tqE=A7q0D+vM5fjP1bScoYHFD9jqJoAAydw@mail.gmail.com>
> I would suggest to add it, and have attached a first draft for what it
> could look like. Thoughts?
Mine:
tl;dr: Just recommend setting var `lexical-binding' to non-nil.
___
1. The recommendation to set variable `lexical-binding'
to non-nil is good.
2. The recommendation to "convert existing Emacs Lisp
code to use lexical binding" is unclear or ambiguous.
Setting the variable to non-nil just makes lexical
binding the default (e.g. for a file), which is what
we should encourage.
#2 can easily be misinterpreted to mean that code
should not use dynamic binding, which would be
misguided, IMO.
There's a reason that Common Lisp and Emacs Lisp have
both kinds of binding. Both are useful for Lisp, and
dynamic binding has particular usefulness for Emacs
users.
I see no reason for adding #2. It doesn't mean
anything good, clear, or important, IMO. #1 suffices,
and is the message to send, I think.
On the other hand, if what you meant by #2 was just
an elaboration of #1, i.e., convert existing code to
work with `lexical-binding' non-nil, then that's OK.
But it's not necessary, as it follows from #1: if you
set `lexical-binding' to non-nil in existing code then
you'll find out what changes you might need to make,
to get it to continue to work well.
next prev parent reply other threads:[~2020-10-21 4:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 1:05 Recommend lexical-binding in Coding Conventions Stefan Kangas
2020-10-21 4:32 ` Drew Adams [this message]
2020-10-21 13:33 ` Stefan Monnier
2020-10-21 14:52 ` Drew Adams
2020-10-21 15:14 ` Stefan Kangas
2020-10-21 15:30 ` Alan Mackenzie
2020-10-21 16:07 ` Robert Pluim
2020-10-21 16:19 ` Stefan Kangas
2020-10-21 16:38 ` Drew Adams
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=22583ae4-5224-4ad0-9378-8015acb4c38f@default \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=stefan@marxist.se \
/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).