GNU bug report logs -
#73853
Should and-let* become a synonym for when-let*?
Previous Next
Full log
Message #177 received at 73853 <at> debbugs.gnu.org (full text, mbox):
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
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.