GNU bug report logs - #73853
Should and-let* become a synonym for when-let*?

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Thu, 17 Oct 2024 16:31:02 UTC

Severity: wishlist

Found in version 31.0.50

Full log


Message #109 received at 73853 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>, Stefan Kangas
 <stefankangas <at> gmail.com>
Cc: Jim Porter <jporterbugs <at> gmail.com>, Sean Whitton <spwhitton <at> spwhitton.name>,
 "73853 <at> debbugs.gnu.org" <73853 <at> debbugs.gnu.org>,
 "monnier <at> iro.umontreal.ca" <monnier <at> iro.umontreal.ca>
Subject: RE: [External] : bug#73853: 31.0.50; Should and-let* become a synonym
 for when-let*?
Date: Sun, 27 Oct 2024 20:00:08 +0000
> (if-let ((a (does-an-a-exist?-then-return-it)))
>     (use a)
>   (do-something-else))

Is that the same as this?

(let ((a (does-an-a-exist?-then-return-it)))
  (if a (use a) (do-something-else)))

> (and-let* ((a (an-a-exists))
>            (b (b-depending-on-a-also-exists)))
>   (test-using a b))

Is that the same as this?

(let* ((a (an-a-exists))
       (b (b-depending-on-a-also-exists)))
  (and a b (test-using a b)))

or this?

(let* ((a (an-a-exists))
       (b (and a (b-depending-on-a-also-exists))))
  (and b (test-using a b)))

or something else?




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.