From: phillip.lord@russet.org.uk (Phillip Lord)
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Most of Elisp lacks lexical-binding: t
Date: Wed, 06 Feb 2019 19:59:58 +0000 [thread overview]
Message-ID: <87imxwsn5t.fsf@russet.org.uk> (raw)
In-Reply-To: <jwvr2cmbb23.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 05 Feb 2019 09:00:28 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> And that's not just for Emacs core -- there is a massive quantity of
>> Elisp in the ecosystem at large which was not written for lexical
>> binding, and still works absolutely fine in current versions of Emacs.
>> Such libraries might well no longer have a maintainer (but at present
>> not be in any need of one).
>
> Yup. The path to getting rid of lexical-binding=nil will be long.
Longer still if it is not started.
> Also, in my experience, the older the package the more likely it is to
> rely in tricky ways on dynamic scoping (by which I mean that some uses
> won't be caught by the compiler warnings).
Put code in so that if copyright year < 2018 then use dynamic by
default, otherwise use lexical?
(This is not a serious suggestion, just in case there is any doubt).
> This needs to be done step by step and there will be many steps.
> I proposed some steps a year ago, BTW. See bug#30078.
>
>> The risk seems rather high to me. I'm not sure the reward would be
>> worth it? (When the reward would seem to be nothing more than library
>> authors being able to omit -*- lexical-binding: t; -*- which, even if
>> it looks untidy, isn't exactly an onerous requirement).
>
> For me the issue is that those two settings define two slightly
> different languages, and that increases complexity for newcomers (and
> for old hats as well: I still regularly find myself writing code that
> assumes lexical-binding is non-nil and using it in a context where that
> assumption is not valid).
I think it also limits the uptake of lexical-binding and the ability to
depend on it, because it requires some additional work.
It will break things, no doubt about it. I suspect it will break things
whenever it happens, though, so this isn't a reason for not doing it.
Phil
next prev parent reply other threads:[~2019-02-06 19:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 12:35 Most of Elisp lacks lexical-binding: t Simon Reiser
2019-02-02 14:54 ` Alan Mackenzie
2019-02-04 1:36 ` Stefan Monnier
2019-02-04 3:46 ` T.V Raman
2019-02-04 12:07 ` Phillip Lord
2019-02-04 21:54 ` Stefan Monnier
2019-02-05 3:31 ` Eli Zaretskii
2019-02-05 5:37 ` Phil Sainty
2019-02-05 14:00 ` Stefan Monnier
2019-02-06 19:59 ` Phillip Lord [this message]
2019-02-06 22:47 ` Stefan Monnier
2019-02-07 16:41 ` Paul Eggert
2019-02-08 3:31 ` Stefan Monnier
2019-02-05 13:48 ` Stefan Monnier
2019-02-06 6:58 ` Richard Stallman
2019-02-06 14:02 ` Stefan Monnier
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=87imxwsn5t.fsf@russet.org.uk \
--to=phillip.lord@russet.org.uk \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).