unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eduardo Ochs <eduardoochs@gmail.com>,
	help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Lexical vs. dynamic: small examples?
Date: Sat, 14 Aug 2021 13:35:57 +0000	[thread overview]
Message-ID: <CO6PR10MB547309D9464D3F28119CB78DF3FB9@CO6PR10MB5473.namprd10.prod.outlook.com> (raw)
In-Reply-To: <CADs++6hEa39j0nC7cx-4Hp_V+JJJyUZffZZqs34EvsxXG-xxUw@mail.gmail.com>

The advantages of lexical binding are easy to find, and all of them are true advantages, for both programming and program analysis. The advantages of dynamic binding are not so easy to find, but they're quite important to an environment such as that of Emacs.

RMS gave good arguments _for Emacs_ (and similar, user-programmer environments) to support dynamic binding, here:

https://www.gnu.org/software/emacs/emacs-paper.html#SEC17

Every Emacs user should, I think, be aware of these advantages - as well as their attendant limitations/drawbacks.

Support of dynamic binding does _not_ require non-support of lexical binding.  

Common Lisp has purposefully had both from the outset (lexical is the default).  Emacs Lisp took a long time to add lexical binding (and it is still not the default), but it too has both now.  And yes, combining both in the same language provides perils as well as advantages.
___

This 1986 MIT video might be of interest here.  It goes over the introduction of side effects into a purely functional Scheme (Lisp-1 dialect).

https://www.youtube.com/watch?v=jl8EHP1WrWY

It talks about the motivation for doing that (and for dynamic binding, though that might not be mentioned explicitly in this session).

This is the 10th session of the Structure and Interpretation of Computer Programs course (presented by the authors), so it builds on top of a pure lambda-calculus model, with its many advantages of simple substitution etc.  You have to imagine that context for this session, i.e., that until then only a purely functional, lexically scoped language was used/presented.

  parent reply	other threads:[~2021-08-14 13:35 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14  3:34 Lexical vs. dynamic: small examples? Eduardo Ochs
2021-08-14  3:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14  4:12   ` Eduardo Ochs
2021-08-14  7:35 ` tomas
2021-08-14 16:00   ` Eduardo Ochs
2021-08-14 19:41     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14 20:42     ` tomas
2021-08-14 19:31   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14 20:31     ` tomas
2021-08-14 21:26       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14 21:29         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14 13:35 ` Drew Adams [this message]
2021-08-14 16:15   ` [External] : " Eduardo Ochs
2021-08-14 19:00 ` Gregory Heytings
2021-08-14 20:16   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14 20:23     ` Gregory Heytings
2021-08-14 21:05       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14 21:13         ` tomas
2021-08-14 21:28           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-14 20:41   ` tomas
2021-08-15  0:29   ` [External] : " Drew Adams
2021-08-15  0:52     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15  1:04     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15  1:18     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15  4:44       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15  5:02         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 15:49         ` Drew Adams
2021-08-15 18:49           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 21:55             ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-08-15 22:04               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 21:57             ` Drew Adams
2021-08-15 22:20               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 22:54                 ` Drew Adams
2021-08-15 23:16               ` Drew Adams
2022-01-09  7:08                 ` Jean Louis
2022-01-09 15:03                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 23:42               ` Arthur Miller
2021-08-15 22:02             ` Lars Ingebrigtsen
2021-08-15 22:22               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 22:44                 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-08-21  3:38                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-24  2:08                     ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-08-25 23:34                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-25 23:40                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-26  0:10                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-26  0:44                             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-26 17:01                               ` FW: " Drew Adams
2021-08-26 23:05                                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-25 23:46                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-25 23:47                         ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-08-26  0:57                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-28  1:36                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-28  1:41                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 22:44               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 22:58                 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-08-15 23:13                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 23:56                     ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-08-16  0:43                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-15 15:42       ` FW: " Drew Adams

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=CO6PR10MB547309D9464D3F28119CB78DF3FB9@CO6PR10MB5473.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=eduardoochs@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).