From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73853: 31.0.50; and-let* is useless Date: Sat, 19 Oct 2024 05:50:49 +0200 Message-ID: <87sess3g4m.fsf@web.de> References: <87a5f2xir8.fsf@web.de> Reply-To: Michael Heerdegen Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31423"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73853@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 05:51:09 2024 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 1t20Ue-00081u-MU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 05:51:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t20UD-0005Rl-GP; Fri, 18 Oct 2024 23:50:41 -0400 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 1t20UB-0005RI-9O for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 23:50:39 -0400 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 1t20UB-0004jA-0S for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 23:50:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Waj8dy8efgPEAdCL/oUAga/luc3d1Af24zi7p0AmPWw=; b=fEBnQOq/db3pQRmv3GuetCV/qJPJR6Z0Tzq13oSCuEDYnO2ZQ0tMhK70AKsiwIxCuGLgzwLXCbdtTi/uL+fF4VQib0H1QQ6Gtj4+1D2ZqfNqIbPpJHoBzPJQX+jUNKfVr/76KLvTIjhRox7llCC5bnOecDxLWPLfaqXAf63uNp9uWYprGx3r96JMDDA5/ooQLHxwkjD62aC7mbUtpf5ZZcaJiLsjo/3RoGYez+PDH65+gBvW5OAp029OhNsuRXPQ8jU2jtE4qvgiqr7dMOMKvbUC39goykvZHNNJQ/qchlAN2pk/RhOaDWkT/a1HcsAC2pbXnDn5s74A0HnhnRWepA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t20UY-0006I7-34 for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 23:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 03:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73853 X-GNU-PR-Package: emacs Original-Received: via spool by 73853-submit@debbugs.gnu.org id=B73853.172930983524130 (code B ref 73853); Sat, 19 Oct 2024 03:51:02 +0000 Original-Received: (at 73853) by debbugs.gnu.org; 19 Oct 2024 03:50:35 +0000 Original-Received: from localhost ([127.0.0.1]:40775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t20U7-0006H7-4M for submit@debbugs.gnu.org; Fri, 18 Oct 2024 23:50:35 -0400 Original-Received: from mout.web.de ([212.227.17.11]:60079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t20U4-0006BA-Lb for 73853@debbugs.gnu.org; Fri, 18 Oct 2024 23:50:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1729309793; x=1729914593; i=michael_heerdegen@web.de; bh=Waj8dy8efgPEAdCL/oUAga/luc3d1Af24zi7p0AmPWw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=WhILvEnp1SI+MvSlW3/x+KXbgIAX5gSGuzwwQWxMOUuu1+bviT9hijrjKrDKt6OY tnuliSjKSF7Q8oLiK6jsaW7/Q0xFzC4Z2snBHrulJ+SUSVB0cy7rX/9XcPaS2NkX5 pU+NfI0V5DKXafQMCav4qxSvD6RIaC/CiG7fczAu/zTmh2NJzpXpbgV6BXAryAWIy l/qkIY3oQwHdNhYlhUyBDMAOfY7MUPezQcx0wVEyB5GStJ7d22t+ZKQhncFLdoep0 IYBDp2jgi6knP0V4y6FUSs0fNFnueOk8VY7FpIjqLp2Fokt4KN8BkfucQoa/n/Qu0 CWaKHg4nyr8FkNFBPA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.75.138.198]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N9cHX-1tyDKP3yGz-015cD2; Sat, 19 Oct 2024 05:49:53 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 18 Oct 2024 19:42:44 -0400") X-Provags-ID: V03:K1:sbCJjrAxJsqEG8xsuYlt+OnvNv50QMnsrTqUA4PqbM2PGsOZG7b qJtjfHiiK3O0DK26u6RxU9KkxS89QqgWuIXT3tft0GmuqSKjeQY3t5TO4FhFlB3W1YLmIBX gixulmDcs7k3575XdMiyoh7wOZ6/xHdJwtyaPc0pZKYascwIbcqPBtwYkpoJhRNraE08YQ+ 2xzJjOd20sK72bAVzSzTQ== UI-OutboundReport: notjunk:1;M01:P0:P4yUjJJxDV0=;ZOg7+beWVyUXfsTP+rUjs0a3cEa /4xsYwTQrFSzqpGIHwMMipRHwZbgeZAR6FG5Mu5CHfxcpjgK5Hm6pRvR7oEaO7tHYcvzW/Wfp 3w8fM1HAt42EYQX4jSqa6IyA7Z+9bIJd4QgV8R8cXi6x30LGor9d9vb1TnDXm58nc2iK7gx1D /1VKh+8JKlp7mxAo76W8sM/TeKoI+Mxo58/VjEe+GohhYR6laPyFCrdV+MTxH9xk6fPdvFgHm w19TwWbOpnlgm0hwR6yyliXj+hOMSH4Vvq4+C30IRJhVs8bFLUlCiaBO2rIJXvHccgl+fdDVH LzQrqxBAOfEfLzU0MnAaBWiot5TVqdxH64Obqsw9E4MUwRj5m7SM/gPhnsw2upQ9ePBLzNJgq IGFV0u5ioWva/0FdQNNd6QnzuzRbK6EoObIc+iDUjnYOLXbweKf57Yx3okn3KuE6hRVFA8RWe /POF4sdy+8IjmQMosz6AXpkopPsxNlfOC1Xq85/XZ326FrLjGPcQ1oSZFsTsFsMerW0I5jArs QgQYM3bwCudVirHeQbbzkCP7DXSu5jxoGhHTsRKDi7t7IBnQwGLk81CSzkQgTSVn6YcMjsr1e l/PFinR3KECs+N2U0pQucHVR0Wthgt1ysG9Ht/d2ZVPMlsGio50mX7POKZ+gXT+TluYNtldjw zWJhMUrBEn4F3gv89qr/qdMJJmIshKciQfLyjtp7TJUPdOYfel1ALrIq/aPr3C9FyVOF1vwiQ hZvINbJyLyiBMnr1HoSL7L01OQgkvxngPKy1qdfXojDcrSscNdOtkUJ2wh2UGb4FMgGaZ95E 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:293827 Archived-At: Stefan Monnier writes: > But there isn't the same "historical" support that justifies having > both, and the syntax&semantics of `and-let*` is just weird: > > - Why allow a BODY if the motivation is to mirror the normal `and`? > If you want a BODY, use `when-let*`. > - What's the use of the final variable binding since (assuming you > don't use BODY) that variable is never used: > > (and-let* ((a (fooa)) > (b (foob a)) > (i-m-useless (fooc a b)))) One could say BODY _is_ the final condition and therefore it has a special syntax because it necessarily doesn't need a binding. That way I've my peace with that syntax. Anyway, removing `and-let*' would be equally unsatisfying, and obviously, at least one the two points will remain unless we change the syntax radically - or remove `and-let*' :-( > - There's a special syntax where the final binding can drop the variable > name (because of the previous point), which makes for an odd syntax > > (and-let* ((a (fooa)) > (b (foob a)) > ((weird-call a b)))) That I feel too. As an alternative we made the pseudo variable _ work without compiler warnings. But one gets used to the variable-less syntax. It's too handy... > So the use with BODY is redundant with `when-let*` and the use without > BODY is quirky (and still redundant with `when-let*`, of course). I see your points, but don't consider them as such a big problem. Anyway, without having something that is obviously better the discussion remains quite philosophical. And replacing calls of `and-let*' with equivalent calls of `when-let*' doesn't make code easier to read, IMO. > 100% agreement. Can we `make-obsolete` the non-star versions? I hope we can. Michael.