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 #201 received at 73853 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 73853 <at> debbugs.gnu.org
Subject: Re: bug#73853: Should and-let* become a synonym for when-let*?
Date: Fri, 24 Jan 2025 12:05:14 +0000
Hello Stefan,

On Sat 18 Jan 2025 at 10:30pm -05, Stefan Monnier wrote:

> I don't have a strong preference either way.
> I just know that they're redundant and would rather see one of the two disappear.
>
> If none of them can't be removed, I'd actually prefer them to be actual
> aliases of each other, so at least ELisp non-specialists don't need to
> learn the subtle differences between the two.

I think you've been talking somewhat as though we were designing a new
language.  But what we're actually considering is changes to macros that
exist, and that have been present instable releases that people rely on.

We should have a bias towards retaining functionality that has been in
releases of Emacs, just as much for macros as for, e.g., key bindings.

Therefore, contrary to what you say, the fact that functionality exists
in existing stable releases does thereby render that functionality more
useful.

If we removed one of them we would be removing the ability to express
one's intention in accordance with the and/when convention about return
values vs. side effects.  So we shouldn't remove them.

As for the question of making them aliases, I don't share your concerns
about empty bodies being especially bad.  So I think I would be more in
support of making when-let* a synonym for and-let* than the other way
around.  But I'm not convinced that any change is required.

-- 
Sean Whitton




This bug report was last modified 140 days ago.

Previous Next


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