[Top][All Lists]

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

bug#30078: 27.0.50; Use lexical-binding for M-:

From: Stefan Monnier
Subject: bug#30078: 27.0.50; Use lexical-binding for M-:
Date: Tue, 20 Mar 2018 15:20:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> Because, having two languages is a bit inconvenient and brings extra
>> complexity: e.g. some code snippets only work right in one of the two
>> languages (usually nowadays it's in the lexbind variant, AFAICT), so you
>> need to label them appropriately.
> Are that inconvenience and complexity really so bad?  They don't sound
> like that.

It's a source of bugs, slows down the interpreter, complicates the
compiler, complicates the doc, regularly confuses new users who copy
snippets of code and use them in the wrong language, ...

Also several macros need to know if the code they generate will be
interpreted in the lexbind-Elisp or the dynbind-Elisp language, so those
are also impacted.

The clear tendency is for new developments to drop support for
dynbind-Elisp whenever it gets in the way (e.g. some macros just signal
an error when used from dynbind-Elisp).  So dynbind-Elisp is slowly
becoming second class citizen.

>> > It would mean old code will not run in Emacs for no good reason.
>> That's true.  Which is why it's a long-term goal only.
> I'm asking why make it a goal at all.

I guess in the worst case we could keep it indefinitely.  But I hope
that in the future no code ends up using dynbind-Elisp "by accident".
IOW dynbind-Elisp should only be used upon explicit request (e.g. by
setting lexical-binding to nil in the file-local vars or by passing
a special `:dynbind` second argument to `eval`).


reply via email to

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