From: Drew Adams <drew.adams@oracle.com>
To: steve-humphreys@gmx.com
Cc: Joost Kremers <joostkremers@fastmail.fm>, help-gnu-emacs@gnu.org
Subject: RE: RE: Understanding the "let" construct and the setting of variables
Date: Thu, 17 Dec 2020 13:57:12 -0800 (PST) [thread overview]
Message-ID: <76bfdd53-e68c-4572-9a41-4f5c693cfb4b@default> (raw)
In-Reply-To: <trinity-02def6ae-edc1-4df5-aa38-6d529ce29ffe-1608235883865@3c-app-mailcom-bs11>
> > What is correct to say is that the let _binding_ of the
> > variable no longer exists, not that the variable itself
> > no longer exists.
> >
> > In the case of a dynamic variable, it continues to exist.
> > And its binding from the let continues to exist as long
> > as the code in the let body is executing.
> >
> > [Yes, some people will consider a let binding to create
> > a _new_ variable. In that sense you can say that that
> > var ceases to exist. But IMO that isn't as clear to
> > users as it is to distinguish the binding from the var.
> > And even if you use the words that way, you still need
> > to point out that the var continues to exist as long as
> > the code within the let body is executing (when the
> > binding is for a dynamic var).]
>
> I would thing the variable has to be made somewhere.
What's your point? Yes, you can think of either a variable
being created or a binding being created. In the case of a
local variable the two amount to different ways of talking
about the same thing.
But in the case of a dynamic variable, it's clearer, and
more common, to talk about a new binding to the same var
being created, rather than a new variable being created.
In particular, a dynamic variable (its latest binding) can
be accessed outside the lexical scope of the let. It's
natural to think in terms of this in terms of the same var
being bound, rebound, etc. in different ways over time.
> In fact people talk about "unboundp".
An unbound variable is a free variable with respect to
some context. If a variable has no binding in any
context then it's free/unbound at the top level.
You can use `let' to bind a variable (dynamically or
lexically). A function parameter gets bound as a local
variable when the function is called. And `defvar' and
`setq' can assign a value to a variable - that assignment
is also a binding, of sorts.
next prev parent reply other threads:[~2020-12-17 21:57 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 0:10 Understanding the "let" construct and the setting of variables steve-humphreys
2020-12-17 0:21 ` Joost Kremers
2020-12-17 2:08 ` steve-humphreys
2020-12-17 3:12 ` steve-humphreys
2020-12-17 8:01 ` Joost Kremers
2020-12-17 8:31 ` steve-humphreys
2020-12-17 8:50 ` Joost Kremers
2020-12-17 8:10 ` Joost Kremers
2020-12-17 8:43 ` steve-humphreys
2020-12-17 8:56 ` Joost Kremers
2020-12-18 20:48 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 20:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 21:07 ` Jean Louis
2020-12-18 22:31 ` tomas
2020-12-18 20:39 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17 2:49 ` steve-humphreys
2020-12-17 7:58 ` Joost Kremers
2020-12-17 16:55 ` Drew Adams
2020-12-17 20:11 ` steve-humphreys
2020-12-17 21:57 ` Drew Adams [this message]
2020-12-17 22:35 ` Michael Heerdegen
2020-12-18 9:01 ` tomas
2020-12-18 9:16 ` Michael Heerdegen
2020-12-18 20:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-19 2:17 ` Michael Heerdegen
2020-12-19 2:52 ` Drew Adams
2020-12-19 5:15 ` Stefan Monnier
2020-12-18 20:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17 0:25 ` steve-humphreys
2020-12-17 0:35 ` steve-humphreys
2020-12-17 1:05 ` Joost Kremers
2020-12-17 1:20 ` steve-humphreys
2020-12-18 20:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17 4:34 ` Jean Louis
2020-12-17 5:12 ` steve-humphreys
2020-12-19 6:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-17 7:31 ` steve-humphreys
2020-12-19 5:55 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-19 6:49 ` Jean Louis
2020-12-20 5:19 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 17:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 17:48 ` tomas
2020-12-18 15:33 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-18 18:12 ` Jean Louis
2020-12-18 18:20 ` Drew Adams
2020-12-18 18:45 ` Jean Louis
2020-12-18 19:16 ` Drew Adams
2020-12-18 20:00 ` Jean Louis
2020-12-18 21:27 ` Christopher Dimech
2020-12-19 6:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
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=76bfdd53-e68c-4572-9a41-4f5c693cfb4b@default \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=joostkremers@fastmail.fm \
--cc=steve-humphreys@gmx.com \
/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).