[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30078: 27.0.50; Use lexical-binding for M-:
From: |
Robert Cochran |
Subject: |
bug#30078: 27.0.50; Use lexical-binding for M-: |
Date: |
Sat, 13 Jan 2018 21:58:48 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Luis Gerhorst <privat@luisgerhorst.de>
>> Date: Sat, 13 Jan 2018 18:50:36 +0100
>> Cc: Eli Zaretskii <eliz@gnu.org>, monnier@IRO.UMontreal.CA,
>> 30078@debbugs.gnu.org
>>
>> 1) Make Elisp more approachable to newcomers. Lexical binding is the default
>> in most programming languages and thus more people are familiar with it. This
>> makes it easier for people to understand existing code since they don‘t have
>> to get used to implicit dynamic binding first, which the code may take
>> advantage of.
>
> Do we know for a fact that most users who extend Emacs by writing
> their own Lisp have background in Lisps and other similar languages
> where lexical binding is the default? If not, dynamic binding might
> be easier to grasp for the newcomers.
I learned Emacs Lisp by learning Common Lisp first when I set out to
learn it. Prior to that, I had been programming in languages that have
lexical scoping as the primary scope mechanism. I personally do not know
of non-Lisp languages that have variables that work like dynamic
variables do.
And of course I can't comment from the perspective from a newcommer any
more, but I'd be of the mind that entirely dynamic binding would be
/less/ easy to grasp, because it does things that I personally find
non-intuitive in certain circumstances. I have programmer friends that
use Emacs but don't do their own Emacs Lisp, and I would hazard a guess
that dynamic bindings would be unintuitive when they differ from lexical
bindings in behavior.
IMO, the fact that dynamic bindings happen to do the same thing as
lexical bindings is the reason the whole thing isn't nearly as confusing
as it could be.
That's not to say that dynamic bindings are bad - far from it. Dynamic
bindings are really useful. But I think that the potentially confusing
behavior should be opt-in, not opt-out.
--
~Robert Cochran
GPG Fingerprint - BD0C 5F8B 381C 64F0 F3CE E7B9 EC9A 872C 41B2 77C2
- bug#30078: 27.0.50; Use lexical-binding for M-:, (continued)
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Noam Postavsky, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Michael Heerdegen, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Michael Heerdegen, 2018/01/12
- bug#30078: 27.0.50; Use lexical-binding for M-:, Luis Gerhorst, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Luis Gerhorst, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:,
Robert Cochran <=
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Richard Stallman, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Drew Adams, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Richard Stallman, 2018/01/14
- bug#30078: 27.0.50; Use lexical-binding for M-:, Stefan Monnier, 2018/01/13
- bug#30078: 27.0.50; Use lexical-binding for M-:, Eli Zaretskii, 2018/01/13
Re: bug#30078: 27.0.50; Use lexical-binding for M-:, nazienham, 2018/01/12