Subject: Re: bug#73853: 31.0.50; and-let* is useless

From: Sean Whitton <[email-masked]>
Date: Sat, 18 Jan 2025 12:04:04 +0000

Hello,

On Fri 17 Jan 2025 at 10:39am -05, Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

>> Right.  The Lisp convention of using `when' for pure control flow and
>> `and' for returning values is a good aid to readability.
>
> AFAIK this convention is followed only by some coders, so it doesn't
> help readability because you can't rely on it.

But it might be specified by an ELPA project's coding style guide, or
you might know that an Emacs subsystem maintainer always uses it and
asks for it in patch reviews.

As it's a readability aid, it doesn't have to be used absolutely
everywhere to be useful.

>> If we don't have and-let*, then we can't use this convention in the case
>> that we also want to bind variables.
>
> Then again, we don't have such a "value returning vs not" duplication
> and associated convention for `let`, `progn`, `lambda`,
> `unwind-protect`, `catch`, `condition-case, ...
>
> The fact we have all three of if/when/and is not a good justification
> for `and-let*`.

I think you are letting the perfect be the enemy of the good, in your
thinking, here.

-- 
Sean Whitton