From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: michael_heerdegen@web.de, 30078@debbugs.gnu.org
Subject: bug#30078: 27.0.50; Use lexical-binding for M-:
Date: Tue, 20 Mar 2018 08:59:12 +0200 [thread overview]
Message-ID: <83k1u7mdvj.fsf@gnu.org> (raw)
In-Reply-To: <jwv370vls5c.fsf-monnier+emacsbugs@gnu.org> (message from Stefan Monnier on Mon, 19 Mar 2018 16:50:34 -0400)
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: michael_heerdegen@web.de, 30078@debbugs.gnu.org
> Date: Mon, 19 Mar 2018 16:50:34 -0400
>
> > Really? Get rid of dynamic binding in ELisp?
>
> Not sure if by "dynamic binding" you mean "the variant of Elisp
> corresponding to lexical-binding = nil" (which I call dynbind-Elisp) or
> "some new Elisp variant where dynamic binding has been removed
> altogether" (which doesn't currently exist AFAIK).
>
> I have no intention to eliminate dynamic binding from Elisp at all.
> What I'd like to see happen within the next, say, 20 years is to get rid
> of the `lexical-binding` variable (i.e. treat everything as if this var
> were always non-nil and as if `eval`s second arg was always non-nil), so
> that dynamic binding only ever happens for those variables that have
> been explicitly declared to be dynamic with `defvar` (as is the case in
> what I call the lexbind-Elisp language).
>
> > Why is that a good idea?
>
> 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 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.
> >> It's dynamic binding which is the odd one out
> > Not for me, it isn't. Maybe that means _I_ amd the odd one out.
>
> Beside Elisp, I know you're familiar with at least one other language
> which only supports lexical scoping: C.
Global variables in C are very similar to dynamic binding, so I had no
problem getting used to ELisp at the time.
> What other language(s) do you know/use? Which scoping do they support?
Every language I ever used (which is not a lot) supports global
variables, so again, no problems in that department.
Or maybe I again misunderstand what you mean by "dynbind".
Anyway, I don't think it's worth our while to discuss what is or isn't
a problem for me personally. The popular style of writing Emacs Lisp
nowadays is very different from what it was 20 or 25 years ago, when I
learned the language, which is an obstacle to someone like myself, who
is not very interested in programming languages and their facilities.
next prev parent reply other threads:[~2018-03-20 6:59 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 16:36 bug#30078: 27.0.50; Use lexical-binding for M-: Stefan Monnier
2018-01-11 20:58 ` Michael Heerdegen
2018-01-12 14:58 ` Stefan Monnier
2018-01-12 16:12 ` Stefan Monnier
2018-01-12 16:53 ` Glenn Morris
2018-01-12 17:23 ` Michael Heerdegen
2018-01-12 18:47 ` Stefan Monnier
2018-01-12 19:35 ` Michael Heerdegen
2018-01-13 17:58 ` Stefan Monnier
2018-01-12 18:34 ` Eli Zaretskii
2018-01-12 18:49 ` Stefan Monnier
2018-01-12 18:55 ` Eli Zaretskii
2018-01-12 19:06 ` Stefan Monnier
2018-01-12 20:03 ` Eli Zaretskii
2018-01-12 20:33 ` Noam Postavsky
2018-01-12 20:55 ` Michael Heerdegen
2018-01-12 21:04 ` Eli Zaretskii
2018-01-12 21:11 ` Michael Heerdegen
2018-01-13 17:50 ` Luis Gerhorst
2018-01-13 19:48 ` Eli Zaretskii
2018-01-13 20:19 ` Luis Gerhorst
2018-01-14 5:58 ` Robert Cochran
2018-01-13 18:19 ` Stefan Monnier
2018-01-13 19:34 ` Eli Zaretskii
2018-01-13 21:58 ` Stefan Monnier
2018-01-13 23:18 ` Richard Stallman
2018-01-14 2:07 ` Drew Adams
2018-01-15 2:34 ` Richard Stallman
2018-01-13 18:05 ` Stefan Monnier
2018-01-13 19:37 ` Eli Zaretskii
2018-03-19 19:32 ` Stefan Monnier
2018-03-19 19:34 ` Stefan Monnier
2018-03-19 20:10 ` Eli Zaretskii
2018-03-19 20:50 ` Stefan Monnier
2018-03-20 6:59 ` Eli Zaretskii [this message]
2018-03-20 19:20 ` Stefan Monnier
2018-04-02 19:40 ` Richard Stallman
2018-04-03 0:12 ` Stefan Monnier
2018-04-03 16:50 ` Richard Stallman
[not found] <mailman.7210.1515688689.27995.bug-gnu-emacs@gnu.org>
2018-01-12 16:28 ` nazienham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k1u7mdvj.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=30078@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).