GNU bug report logs - #73853
Should and-let* become a synonym for when-let*?

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Thu, 17 Oct 2024 16:31:02 UTC

Severity: wishlist

Found in version 31.0.50

Full log


Message #41 received at 73853 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 73853 <at> debbugs.gnu.org,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#73853: 31.0.50; and-let* is useless
Date: Mon, 21 Oct 2024 20:09:04 +0800
Hello,

On Mon 21 Oct 2024 at 10:57am +02, Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>
>> 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.
>
> Good point, we should decide which names to use.  Personally i prefer
> the names ending with star, because bindings are not parallel as in
> `let'.  But we also already spoke about this.  Dunno which names are
> more popular, it's a matter of taste.

I prefer if-let* for this reason too.  Also:

- it informs a reader that there is no way they are going to see the
  unusual single binding syntax.

- Common Lisp's ubiquitous Alexandria library of basic utilities has an
  if-let which has the unusual single binding syntax.  In fact, that is
  probably where our if-let came from.  So if we are moving away from
  that, it makes sense to use a different name for the thing we
  invented -- if-let*.

-- 
Sean Whitton




This bug report was last modified 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.