unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	73853@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#73853: 31.0.50; and-let* is useless
Date: Mon, 21 Oct 2024 20:09:04 +0800	[thread overview]
Message-ID: <87y12hirof.fsf@melete.silentflame.com> (raw)
In-Reply-To: <878quh6dg7.fsf@web.de> (Michael Heerdegen via's message of "Mon,  21 Oct 2024 10:57:12 +0200")

Hello,

On Mon 21 Oct 2024 at 10:57am +02, Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Augusto Stoffel <arstoffel@gmail.com> writes:
>
>> I always type `if-let' because it looks cleaner and saves one indentation
>> column (which are purely cosmetic reasons), but also I think it would be
>> weird to have a something* when there's no accompanying something.
>
> Good point, we should decide which names to use.  Personally i prefer
> the names ending with star, because bindings are not parallel as in
> `let'.  But we also already spoke about this.  Dunno which names are
> more popular, it's a matter of taste.

I prefer if-let* for this reason too.  Also:

- it informs a reader that there is no way they are going to see the
  unusual single binding syntax.

- Common Lisp's ubiquitous Alexandria library of basic utilities has an
  if-let which has the unusual single binding syntax.  In fact, that is
  probably where our if-let came from.  So if we are moving away from
  that, it makes sense to use a different name for the thing we
  invented -- if-let*.

-- 
Sean Whitton





  reply	other threads:[~2024-10-21 12:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 16:27 bug#73853: 31.0.50; and-let* is useless Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-17 16:40 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18  2:11 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-18 23:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19  3:50     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21  7:07     ` Augusto Stoffel
2024-10-21  8:57       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 12:09         ` Sean Whitton [this message]
2024-10-19  3:38   ` Sean Whitton
2024-10-20 12:24     ` Stefan Kangas
2024-10-22 14:47       ` bug#73853: 31.0.50; Should and-let* become a synonym for when-let*? Sean Whitton
2024-10-22 15:24         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y12hirof.fsf@melete.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=73853@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).