Subject: bug#73853: Should and-let* become a synonym for when-let*?

From: Sean Whitton <[email-masked]>
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