[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Most of Elisp lacks lexical-binding: t
From: |
Phillip Lord |
Subject: |
Re: Most of Elisp lacks lexical-binding: t |
Date: |
Wed, 06 Feb 2019 19:59:58 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) |
Stefan Monnier <address@hidden> 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
- Most of Elisp lacks lexical-binding: t, Simon Reiser, 2019/02/02
- Re: Most of Elisp lacks lexical-binding: t, Alan Mackenzie, 2019/02/02
- Re: Most of Elisp lacks lexical-binding: t, Stefan Monnier, 2019/02/03
- Re: Most of Elisp lacks lexical-binding: t, T.V Raman, 2019/02/03
- Re: Most of Elisp lacks lexical-binding: t, Phillip Lord, 2019/02/04
- Re: Most of Elisp lacks lexical-binding: t, Stefan Monnier, 2019/02/04
- Re: Most of Elisp lacks lexical-binding: t, Eli Zaretskii, 2019/02/04
- Re: Most of Elisp lacks lexical-binding: t, Phil Sainty, 2019/02/05
- Re: Most of Elisp lacks lexical-binding: t, Stefan Monnier, 2019/02/05
- Re: Most of Elisp lacks lexical-binding: t,
Phillip Lord <=
- Re: Most of Elisp lacks lexical-binding: t, Stefan Monnier, 2019/02/06
- Re: Most of Elisp lacks lexical-binding: t, Paul Eggert, 2019/02/07
- Re: Most of Elisp lacks lexical-binding: t, Stefan Monnier, 2019/02/07
- Re: Most of Elisp lacks lexical-binding: t, Stefan Monnier, 2019/02/05
- Re: Most of Elisp lacks lexical-binding: t, Richard Stallman, 2019/02/06
- Re: Most of Elisp lacks lexical-binding: t, Stefan Monnier, 2019/02/06