GNU bug report logs -
#28254
26.0.50; SRFI-2 and-let*
Previous Next
Reported by: Mark Oteiza <mvoteiza <at> udel.edu>
Date: Sun, 27 Aug 2017 20:12:02 UTC
Severity: wishlist
Found in version 26.0.50
Done: Mark Oteiza <mvoteiza <at> udel.edu>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 28254 <at> debbugs.gnu.org (full text, mbox):
On 31/08/17 at 10:55pm, npostavs <at> users.sourceforge.net wrote:
>Mark Oteiza <mvoteiza <at> udel.edu> writes:
>
>> its behavior overlaps with when-let* but each has things the other
>> lacks.
>
>Can the differences be minimized? I think having a bunch of tiny
>differences is not good for reader comprehension or code reuse.
Understood. I was leaning toward putting and-let* in its own file
because of the differences instead of having them all in the same
place. I'd rather have no and-let* than a gimped and-let* (I shouldn't
have made the alias, in retrospect).
>How much would be lost if we implemented and-let* like this?
>
>(defmacro and-let* (varlist &rest body)
> `(when-let* ,varlist
> ,@(or body '(t))))
The (EXPR) part of it, e.g.
(and-let* ((x ...)
(y ...)
((x > y)))
...)
where the body gets executed if x > y.
I didn't try writing it in the style of if-let*--perhaps if-let* could
be extended and all three macros would learn (EXPR). if-let* already
has the single tuple quirk which differs from most (if not all?) lets in
Elisp.
This bug report was last modified 7 years and 253 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.