From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Richard Stallman <rms@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#66756: 30.0.50;
 [PATCH] Improve discussion of 'let' in Elisp Introduction manual
Date: Sun, 05 Nov 2023 21:29:30 -0500
Message-ID: <E1qzpMo-0002Ai-Ao@fencepost.gnu.org>
References: <a9812c1d-71e4-5f3f-83a4-a2923e649f3a@gmail.com>
Reply-To: rms@gnu.org
Content-Type: text/plain; charset=Utf-8
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="36109"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 66756@debbugs.gnu.org
To: Jim Porter <jporterbugs@gmail.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 06 03:30:40 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1qzpNv-0009DW-Sf
	for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Nov 2023 03:30:40 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1qzpNi-0005hf-OE; Sun, 05 Nov 2023 21:30:26 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1qzpNh-0005h9-FM
 for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 21:30:25 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1qzpNh-000859-6a
 for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 21:30:25 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1qzpOI-0006Gr-8f
 for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 21:31:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Richard Stallman <rms@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Mon, 06 Nov 2023 02:31:02 +0000
Resent-Message-ID: <handler.66756.B66756.169923781524033@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 66756
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
Original-Received: via spool by 66756-submit@debbugs.gnu.org id=B66756.169923781524033
 (code B ref 66756); Mon, 06 Nov 2023 02:31:02 +0000
Original-Received: (at 66756) by debbugs.gnu.org; 6 Nov 2023 02:30:15 +0000
Original-Received: from localhost ([127.0.0.1]:38470 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1qzpNW-0006FT-SB
 for submit@debbugs.gnu.org; Sun, 05 Nov 2023 21:30:15 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43846)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rms@gnu.org>) id 1qzpNV-0006F8-8V
 for 66756@debbugs.gnu.org; Sun, 05 Nov 2023 21:30:13 -0500
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rms@gnu.org>)
 id 1qzpMo-0007lS-Si; Sun, 05 Nov 2023 21:29:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=QGmjkkHOijNZoYFM3F16Qowkk2bO45U0D797pXddglY=; b=qwdwDsJwfNCg
 7bRgnfCSbZb0oApuoQ9IVTb6wnEUQrIJUn5/fbNhIAC/IroQHne3L4nIKegCnu0ttFT9o/T4APM/U
 iPtS2FjKQirhbTcOrg9AEUd9an1aZ1KVn0KcRZ/ZCfmbmXrs4fZMjqCyusdO4DMtmvoE57dZSj5Ub
 RNHJ2ynzuOypxvdNmxPSFBrzb/65b16q5tptV/YFrvzTpdTHijJl4k57x14LnzZBUf1BW2TC7/+2B
 1x+3s3Iy/wVFH4Y7TewK2c46N2sILNWAHrv8eFc06LG2/SGXMQM8E6fAt67BZfX30CcCjno7pEgfx
 cZdk70YjF3xi/pKTXfw7nw==;
Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@gnu.org>)
 id 1qzpMo-0002Ai-Ao; Sun, 05 Nov 2023 21:29:30 -0500
In-Reply-To: <a9812c1d-71e4-5f3f-83a4-a2923e649f3a@gmail.com> (message from
 Jim Porter on Wed, 25 Oct 2023 22:54:25 -0700)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.bugs:273852
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/273852>

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > +The @code{let} special form provides a way to confine your variables
  > +to a particular section of your code (in computer science jargon, a
  > +``scope'').  @code{let} creates a name for a @dfn{local variable} that
  > +overshadows any use of the same name outside the @code{let} expression
  > +(we call this ``binding'' the variable).  This prevents any accidental
  > +usage of these variables outside of the @code{let} expression.

This is one of several reasons to use `let'.

Others are

* To compute a value once and use it more than once.

* To create a loop index variable.

* For special variables, to bind them si as to control the behavior
of other code.

Should all of them be mentioned in this node?  I am not sure;
that is a pedagogical question.  But this node shouldn't assert
that one reason is the only reason.


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)