unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: 73853@debbugs.gnu.org
Cc: Michael Heerdegen <michael_heerdegen@web.de>, monnier@iro.umontreal.ca
Subject: bug#73853: 31.0.50; and-let* is useless
Date: Sat, 19 Oct 2024 11:38:01 +0800	[thread overview]
Message-ID: <87froszrs6.fsf@melete.silentflame.com> (raw)
In-Reply-To: <87a5f2xir8.fsf@web.de> (Michael Heerdegen via's message of "Fri,  18 Oct 2024 04:11:23 +0200")

Hello,

On Fri 18 Oct 2024 at 04:11am +02, Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> `and-let*'s purpose is to express conditions, `when-let*'s is
> conditional evaluation.  We have `and-let*' and `when-let*' for the
> same reason we have `and' and `when'.  See prior discussions.

Right.  The Lisp convention of using `when' for pure control flow and
`and' for returning values is a good aid to readability.

If we don't have and-let*, then we can't use this convention in the case
that we also want to bind variables.

So, I am very keen for and-let* to remain.

>> [ 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.

Yes.  I would like us to move forward with removing the non-star ones.

I believe there was a previous attempt to deprecate them but it had to
be backed out.  But maybe now is the time to try again.

-- 
Sean Whitton





      parent reply	other threads:[~2024-10-19  3:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 16:27 bug#73853: 31.0.50; and-let* is useless Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-17 16:40 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18  2:11 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18 23:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19  3:50     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19  3:38   ` Sean Whitton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87froszrs6.fsf@melete.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=73853@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).