emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lexical-binding is turned on in more use cases


From: Alan Mackenzie
Subject: Re: lexical-binding is turned on in more use cases
Date: Tue, 10 Mar 2020 19:13:28 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Stefan.

On Mon, Mar 09, 2020 at 17:18:12 -0400, Stefan Monnier wrote:
> > I do hope we're taking Alan's concern seriously here, all joking
> > aside. This change pretty harshly violates the "principle of least
> > surprise", and working with lexical-scope still isn't the norm for
> > most old school Emacs Lispers. I'm not sure I wuold have ever
> > discovered the solution to such a problem in my own debugging, had I
> > not chanced on this discussion thread.  What are we gaining, again,
> > at the cost of this potential confusion?

> The problem is real.  I don't think we can solve it without pain.

You haven't answered the question.  Let me put it to you in a slightly
different way:  What specific real problem does forcing M-: to use
lexical binding solve?

> Basically, M-: doesn't easily know whether to use lexical-binding or
> not because it's only connected to the buffer where the code will be
> run but not to some source buffer where the "related" code might
> reside (and which we could try and use to guess which mode to use).

Lexical binding in M-: simply isn't very useful.  For any real needs,
dynamic binding works better.

> You're probably right that "lexical-scope still isn't the norm for most
> old school Emacs Lispers", so this change will irk those.  But my
> impression is that the majority of *new* Elisp packages is using
> lexical-binding nowadays, and the majority of Elisp snippets I see
> quoted in StackExchange either work both ways or presume
> lexical-binding (and then come with additional comments along the lines
> of "I tried it and it didn't work ... indeed, you need to enable
> lexical-binding by ... ah yes now it works").

The above paragraph is sophistry.  Lexical binding in M-: simply isn't
very useful, even when calling functions compiled with lexical binding.

What specific real problem does forcing M-: to use lexical binding
solve?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]