From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#73853: 31.0.50; and-let* is useless Date: Mon, 21 Oct 2024 09:07:42 +0200 Message-ID: <87r08akk75.fsf@gmail.com> References: <87a5f2xir8.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10063"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: michael_heerdegen@web.de, monnier@iro.umontreal.ca To: 73853@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 21 09:08:52 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 1t2mX6-0002SE-Gj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Oct 2024 09:08:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2mWt-0007d2-3K; Mon, 21 Oct 2024 03:08:39 -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 1t2mWq-0007cg-HP for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 03:08:36 -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 1t2mWq-0003wf-3r for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 03:08:36 -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=TEbFQXAbE4EnVwfEWf2mx6myEEjbMc12hVa7PzNjaKM=; b=Ow6UWIEweHSDbetofQIH8UIX9BXnwMEmJvSGFY1AoObghJX4vmVCyXHVR7GROxK3B7d9KxpVUEDroD+481z7mJVVZfGM3+s6hAkxhbMXzTiaz3DeLjGFn8GJpaet5Jz6B/8dvYkE0DIJ0YMb/+aAk18rsqiykGYxsWrBD5qTK99J4DNdMLCJEm0pFaaVWUGGoEocFPlB2XG0wHuerf/FnZp+XI939RO2TcnsmoNwmx3570XwICMlPqeTp+TayhN/i84yzrGHooNNxPEDN5bOaqRNlvWu4X867FFSdjyGt+Ke8b9fB3/GotHSvxXtLn0NbmCFaQqMu6OWhXydOM9pfw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2mXF-0000Vx-U8 for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 03:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2024 07:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73853 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Michael Heerdegen , Stefan Monnier , 73853@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17294944981917 (code B ref -1); Mon, 21 Oct 2024 07:09:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Oct 2024 07:08:18 +0000 Original-Received: from localhost ([127.0.0.1]:49858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2mWX-0000Uq-NI for submit@debbugs.gnu.org; Mon, 21 Oct 2024 03:08:18 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2mWW-0000Uj-Ax for submit@debbugs.gnu.org; Mon, 21 Oct 2024 03:08:16 -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 1t2mW5-0007YW-QQ for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 03:07:49 -0400 Original-Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2mW4-0003ue-6L for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 03:07:49 -0400 Original-Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-53a007743e7so4754821e87.1 for ; Mon, 21 Oct 2024 00:07:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729494466; x=1730099266; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=TEbFQXAbE4EnVwfEWf2mx6myEEjbMc12hVa7PzNjaKM=; b=Wt9OvayQZUUIxctBfN3vw3zW3YhFhYG71fJwPU00/xeu35XY2jJ7EsURrGo0rPpYO+ pcbZ+aZDtqXxU+p+OVhF2hJXd+t7CNbpi0EvnLmtvkmg+hINzMuLtKgnnw9rPEClENfF i7btDhJ7A3s3L4O1GJnACp5vAppgw3ucrNnN3n6WhvCtH0EJzRxUrEB3vUQqP7L7cIv9 UD+L1q77jIhoLrRbdXzxoXml3Ehxk03m7Y6SnpjF1CFCnaDG4+AxaRX3XR4Qw+ojY7Jb rNxVGcqIs7s3Nh4Aeq0xGOgPzQJHFvCu9Fey/PS3vsoyiR1uPKJ8QqIxyTKCdBjTORsi 2tlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729494466; x=1730099266; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TEbFQXAbE4EnVwfEWf2mx6myEEjbMc12hVa7PzNjaKM=; b=JuB3EktdBmkdmUs/+SQjSZRvYF81nyrnCJYHSxAPEzEkSNqGndDAnAkkr2NqcnW3DA 9ljLuI/AexBXmQXFmWvJSvDNJO4fPi7vYgdmNkaDj09zpxnbNVggz6QzA70CoycL2kWn eQEAWoRiaigjkoss3TmlQfDa9qfEfULYpVJjpgHwj5czMQHTVNLpDlwayQeGiwmvcxsE iCNubn/lfPTpE+hXDJ2mkVb3ixOPJ9u22Rr6MDyiERQML7IFUe9g/oiWHwzyLOfgscH6 T8i/PVK1Fv3FTTHaN9FawqL528yh+QSakQSJuVSDCUXzfVGfGp6qDTcODTa9YsTTzqtk ZDRg== X-Gm-Message-State: AOJu0Yxtb3YALc20RQgJiQ8smOflE7gI0IpAifi3Y+YmnjSyGIoHfZoS quo5rkNsmkyJ8OnDj2k6oItOV5AGNgpUlPHYnYANoYCDVB4/xfAG X-Google-Smtp-Source: AGHT+IFKe29sWyeIlxLoHrGuq13nYejJlyFb/T+mqj/od1lLVrWvlQ3D7tVom0UexOag6I7Mjw9VIg== X-Received: by 2002:a05:6512:3b0f:b0:536:56d8:24b4 with SMTP id 2adb3069b0e04-53a154417b9mr3712250e87.5.1729494465521; Mon, 21 Oct 2024 00:07:45 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8a87:ff00::d6f6]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66a6a734sm1627365a12.58.2024.10.21.00.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 00:07:43 -0700 (PDT) In-Reply-To: (Stefan Monnier via's message of "Fri, 18 Oct 2024 19:42:44 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=arstoffel@gmail.com; helo=mail-lf1-x130.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:294027 Archived-At: On Fri, 18 Oct 2024 at 19:42, Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: >>> [ I think we have too many (if|when|and)-let(*) for our own good: we >>> should pick some winners and deprecate the other ones. ] >> AFAIR the non-star versions exist for backward compatibility only - so I >> would rather get rid of these. Parallel existence of these non-star >> vs. star versions should be a temporary state, it complicates the matter >> for an epsilon gain. > > 100% agreement. Can we `make-obsolete` the non-star versions? Wait... The point of make-obsolete is to generate warning so people migrate their code, right? So why not warn on the weird (single-variable binding) use of the non-star version, to eventually remove that syntax as well as the star variants? I always type `if-let' because it looks cleaner and saves one indentation column (which are purely cosmetic reasons), but also I think it would be weird to have a something* when there's no accompanying something. >>> I could see a use for something called `and-let(*)` but without a BODY, >>> for the purpose of remove a level of parens and indentation: >>> >>> (and-let* >>> (x1 (foo1)) >>> (x2 (foo2))) >>> >>> i.s.o >>> >>> (and-let* >>> ((x1 (foo1)) >>> (x2 (foo2)))) >> >> Ugh! - I could not imagine anything with more potential for confusion as >> removing the paren around a list of bindings. > > FWIW, I agree, I don't like that either. Sure, I guess nobody wants that, but this idea is getting closer to a `thread-while' macro (variation of `thread-as') which I still maintain would be really handy (much more so than the existing ones, which are limited by the inconsistency of the argument ordering in Elisp).