From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: Better documentation for non-binding clauses of if-let and friends Date: Mon, 11 Nov 2024 23:51:29 +0100 Message-ID: <861pzh1j0u.fsf@fastmail.fm> References: <86msi69icp.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Alfred M. Szmidt" , arthur miller , "emacs-devel@gnu.org" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 11 23:52:21 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 1tAdGd-0000iJ-7W for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Nov 2024 23:52:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAdG0-00089F-1d; Mon, 11 Nov 2024 17:51:40 -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 1tAdFx-00088n-IC for emacs-devel@gnu.org; Mon, 11 Nov 2024 17:51:38 -0500 Original-Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tAdFv-0000eC-TO; Mon, 11 Nov 2024 17:51:37 -0500 Original-Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id D471C11400A8; Mon, 11 Nov 2024 17:51:33 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Mon, 11 Nov 2024 17:51:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1731365493; x=1731451893; bh=73HvnRoAoh lghtlZPYXFb29BKOvL6DU+bQAJzGNYBBs=; b=R+JFhaw0sTStAnj01gY3EEKS+p TuzIq8LvPjRobhVzQ6d5UTzoO6fJzzd6CId1Q2XAWw3Lc850HUT6lotGphly5695 c8gEKC1l7R0y/PeQD+/h4l2LSAlyrV4kowH19IpcuOufNjnk66S5WrDOW5Xz9nOF ZvInGF26URB4I1AfHs7FCFnRDrugfdLQjNTpWLK+LaSqeEzB028sjHqmdcP1VnFM 71xMmltdKjbDfhAI7w1hzMup91J90ILyjdab4wh/Evsg/ZpxJhHp+uouzyqlKVPs 3nJcxjWiYua32WR+9EW/Suv+C9rjpZDV5phmVBhwrVkVZAmdokYyErhEuaSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1731365493; x=1731451893; bh=73HvnRoAohlghtlZPYXFb29BKOvL6DU+bQA JzGNYBBs=; b=jRsKxNw6YeUWPk3Kj+EYsEiMFHapHD7FAdnd0BojzJaSjKk4Kil 5mgxdp4U0GMFHDTExMiLTYxbTs/IlXXwH966ICXR5riPtk/PEjpAExIScTA/QKeh ahNiUuPQMZnAnCc00knkk1ByFZuqZrX2f5Tzi54lVsZPQsKp0URedvkq7dO0G9w4 K7WZhqDVLFf12TW4jzWmexf4gnNuLYAdIIbGDVMyekkpZ0RhrJX+ejrgxo7JvSC9 GfUYmG+BrkULoOE4JJXfir7wJ7UQI718NZo8XagjOlWmyt6hD6XfxgLYxaRYumS9 SKYjqLDMIvgn6s8do8ZngDWmgz/icKQapAg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudefgddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefhvfevufgjfhffkfggtgesthdtredttddttdenucfh rhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhrvghmvghrshesfhgrsh htmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepkeevleeiueeltedtfeeugedvudek hfegveeludevieelteekgefgkefhueffffeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghi lhdrfhhmpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtth hopegvmhgrtghsqdguvghvvghlsehgnhhurdhorhhgpdhrtghpthhtoheprghrthhhuhhr rdhmihhllhgvrheslhhivhgvrdgtohhmpdhrtghpthhtoheprghmshesghhnuhdrohhrgh dprhgtphhtthhopegurhgvfidrrggurghmshesohhrrggtlhgvrdgtohhm X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Nov 2024 17:51:31 -0500 (EST) In-Reply-To: (Drew Adams's message of "Mon, 11 Nov 2024 21:21:39 +0000") Received-SPF: pass client-ip=202.12.124.147; envelope-from=joostkremers@fastmail.fm; helo=fout-b4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:325414 Archived-At: On Mon, Nov 11 2024, Drew Adams wrote: > (let*((open (and (parsebib--char "@") > (parsebib--keyword '("string")) > (parsebib--char "{("))) > (definition (and open (parsebib--assignment))) > (s (and definition > (parsebib--char > (alist-get open '((123 . "}") (40 . ")"))))))) > (if s > definition > (signal 'parsebib-error > (list (format "Malformed @String definition at position %d,%d" > (line-number-at-pos) (current-column)))))) [...] > Beauty and clarity are in the eye of the beholder, of > course. YMMV. Yeah, I'm afraid I prefer the `if-let*` version. IMHO it more closely reflects the parser grammar rule; it avoids unnecessary repetition of variables (`open` and `definition` here) and the `and` forms that I feel just obscure what's actually relevant. -- Joost Kremers Life has its moments