Subject: bug#28254: 26.0.50; SRFI-2 and-let*

From: Mark Oteiza <[email-masked]>
Date: Fri, 1 Sep 2017 22:10:43 -0400

On 31/08/17 at 10:55pm, [email-masked] wrote:
>Mark Oteiza <[email-masked]> 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.