From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: Better documentation for non-binding clauses of if-let and friends Date: Mon, 11 Nov 2024 04:58:23 -0500 Message-ID: References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17894"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: arthur miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 11 10:59:17 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tARCW-0004Up-EH for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Nov 2024 10:59:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tARBj-0003ay-9L; Mon, 11 Nov 2024 04:58:27 -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 1tARBh-0003ao-4C for emacs-devel@gnu.org; Mon, 11 Nov 2024 04:58:25 -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 1tARBg-0002L1-Bw; Mon, 11 Nov 2024 04:58:24 -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=wfHWZ4Tqqy2RpawQP+MJ1FZa7a9qRLkFBjNX73C4cFs=; b=LDv1WVxuGjgQ J0zQsQmp3HiFdwfQe6+7/nrnXyCV4hDdiqqzHHWZ6RAi+aTEcOZVMbpLYcw9iszESTrOh7rwYYfoI EFFT5EyPDusZzHVlpI6MFnEcVdR21iS64eNQX+/mIh6ehbtWzJ/7gNUxuWn+T9xh594KoFvoIcKm/ hXbqXOB3SOnK1nZ7cV1Li9DIx84TW5Wu5QRDZmMDpCTMkZGuNMRyZ0iwSXg17VtTK76YQrZlQRe4m npogeexS04jOTiEjPrVuLtCG/rocOMf9DsFpradmUCI164eAr/a+FwZs28e379GZRUxzVziTD+V1r iZ/ObLXv4j235bfAZidJLw==; Original-Received: from ams by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1tARBf-00019h-Sl; Mon, 11 Nov 2024 04:58:23 -0500 In-Reply-To: (message from arthur miller on Mon, 11 Nov 2024 09:28:52 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325397 Archived-At: That is the gotcha that got me: it says SPEC is "like let*", so this "-let*" in the name take my mind to believe it established ordinary let*-bindings. However, in while-let, these are not ordinary, but read-only. So they are not the same, since they don't obey the ordinary behavior of let* bindings. I agree, but the question really is what should be done -- either satisfy one camp or the other. I personally do not get what one gets from using WHILE-LET -- the construct seems forced, and very rare to use. IF-LET, WHEN-LET I can maybe guess but they too seem force constructs, and why isn't there a UNLESS-LET and OR-LET*? But I'll leave it at that, personal preferences and all. > But I agree with you that the manual is incomplete or even > wrong here. If that semantic of while-let is desirable to have, than the manual would have to catch the details of while-let and its non-general nature, read-only semantic of bindings and perhaps mention the named-let as a more general alternative. Yup.