From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Most of Elisp lacks lexical-binding: t Date: Tue, 05 Feb 2019 09:00:28 -0500 Message-ID: References: <15a15e1c-c44b-b978-82f0-7bbb6b1b8ff1@googlemail.com> <20190202145423.GB1067@ACM> <87y36vzrhl.fsf@russet.org.uk> <83zhraud00.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="197799"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 05 15:06:32 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gr1Ms-000pF2-RG for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2019 15:06:30 +0100 Original-Received: from localhost ([127.0.0.1]:60916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr1Mr-0003G3-LZ for ged-emacs-devel@m.gmane.org; Tue, 05 Feb 2019 09:06:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr1Ls-0003F3-BZ for emacs-devel@gnu.org; Tue, 05 Feb 2019 09:05:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr1LY-0005uY-Ks for emacs-devel@gnu.org; Tue, 05 Feb 2019 09:05:17 -0500 Original-Received: from [195.159.176.226] (port=36778 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gr1LY-0005u1-85 for emacs-devel@gnu.org; Tue, 05 Feb 2019 09:05:08 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gr1LS-000n7V-Jw for emacs-devel@gnu.org; Tue, 05 Feb 2019 15:05:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:OOyJtSPkrBMuWHvNEb1ApzVATbY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232992 Archived-At: > 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. 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). 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). Stefan