From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66756: 30.0.50; [PATCH] Improve discussion of 'let' in Elisp Introduction manual Date: Fri, 24 Nov 2023 13:41:04 +0200 Message-ID: <838r6nfkfj.fsf@gnu.org> References: <3ade119d-0f0d-e60e-1bdc-9c7e02c1559c@gmail.com> <381836df-c16f-b3e7-d0c4-473290e165de@gmail.com> <9239b6bd-b476-b6c1-aef9-245e439aee42@gmail.com> <83jzq7fx5o.fsf@gnu.org> <64d90b0b-e003-7bc3-5312-6c7ab4c4591f@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19482"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, 66756@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 24 12:42:23 2023 Return-path: 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 ) id 1r6UZi-0004tP-EY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Nov 2023 12:42:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r6UZM-0005aS-3a; Fri, 24 Nov 2023 06:42:00 -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 ) id 1r6UZK-0005aF-VU for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 06:41:59 -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 ) id 1r6UZJ-00015i-Mp for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 06:41:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r6UZN-0007NA-QG for bug-gnu-emacs@gnu.org; Fri, 24 Nov 2023 06:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Nov 2023 11:42:01 +0000 Resent-Message-ID: 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.170082608728299 (code B ref 66756); Fri, 24 Nov 2023 11:42:01 +0000 Original-Received: (at 66756) by debbugs.gnu.org; 24 Nov 2023 11:41:27 +0000 Original-Received: from localhost ([127.0.0.1]:35747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6UYp-0007MN-AE for submit@debbugs.gnu.org; Fri, 24 Nov 2023 06:41:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r6UYn-0007M5-H2 for 66756@debbugs.gnu.org; Fri, 24 Nov 2023 06:41:26 -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 ) id 1r6UYd-0000zh-Lf; Fri, 24 Nov 2023 06:41:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=w5kjPvojXMgymUc892VK+K4+qsj5u5d9BE9Oj40R0cY=; b=CQ419JxcLv9w vSE56Fartc6MAoCnUkzRMzC96Hz/BJcU7qurjVQi6bD91Dldm897mM9+fB4zoH569XaovSH3ww9VR AH00ZCgDQQpmjVnz53qxP1ocm3bt5WrZfenVCGKrhXUAcRT/jWOtckOUhk73sbgCcS0aFO7bGkGl2 oolaLQI/yA7LXeNjLg1k7lpgXLgkW92i/r3BxRKXycQjKawdbqzv79TPrVliCg9jvMsHwSALvtn3o qF14Ds76ELuZsrwx4Y7xw/TD6a4phw5O5ti/uTqZ3saXXcMxgVqa5C5m7IpKNc55S+gzpP5wtFxHE BiAIEqE+w3De62BFCupjgw==; In-Reply-To: <64d90b0b-e003-7bc3-5312-6c7ab4c4591f@gmail.com> (message from Jim Porter on Fri, 24 Nov 2023 01:01:33 -0800) 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:274853 Archived-At: > Date: Fri, 24 Nov 2023 01:01:33 -0800 > Cc: rms@gnu.org, 66756@debbugs.gnu.org > From: Jim Porter > > >> +As we discussed before, under lexical binding, @code{let} defines a > >> +@emph{place} in your code where the variables have their own local > >> +meaning. Under dynamic binding, the rules are different: instead, you > >> +are defining a @emph{time} in your code when the variables have their > >> +own local meaning. > > > > If this wants to explain the difference between compile-time and > > run-time binding, then perhaps it should say so, instead of talking > > about the confusing "place where" vs "time when" the value changes? > > And if compile-time is problematic (Emacs being an interpreter), then > > we should find another description, one that doesn't use confusing > > concept of "place". > > I'm open to other wordings, but I wanted to describe what's going on > without getting into the details of the interpreter or how it evaluates > the code. The "place" is supposed to refer to the actual body of the > 'let' form. That's described in the first part I changed. However, the > "time" description could probably be expanded. > > Maybe we could contrast "within the body of the let expression" vs > "during execution of the let expression"? That gets across the idea to > me that the former is about compile-time ("body" refers to the actual > Lisp form), while the latter is about run-time ("execution"). "During the execution" is probably a good idea, but "within the body of the expression" Does not seem to contrast with that, since it also holds for dynamic binding. I think the explanation should focus on the code of getx, not on the code in the 'let'-form's body. The reason for what happens under lexical binding is in getx.