unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: Sean Whitton <spwhitton@spwhitton.name>,
	60758@debbugs.gnu.org, 60758-done@debbugs.gnu.org
Subject: bug#60758: 29.0.60; while-let uses if-let* convention in contradiction to the docstring
Date: Sat, 14 Jan 2023 17:11:34 +0100	[thread overview]
Message-ID: <87o7r1p03t.fsf@web.de> (raw)
In-Reply-To: <c94f3d17-d75e-f922-5fdb-c1aea5c050ad@daniel-mendler.de> (Daniel Mendler's message of "Sat, 14 Jan 2023 16:35:28 +0100")

Daniel Mendler <mail@daniel-mendler.de> writes:

> But then it may make sense to deprecate `if-let` and `when-let`
> altogether in favor of `if-let*` and `when-let*`?

I don't recall why that hasn't been done.  There was a very long
discussion about it.  Probably the answer was "the syntax had been there
for too long and now too many packages use it and we don't want to break
them", I don't recall.  Maybe you can find these discussions.  There had
not been an agreement at least.

> I don't think there is anything wrong with the syntax "anomaly". I use
> the syntax with only a single binding happily in many of my packages.

The problem is the ambiguity that these syntax variations:

| An element can additionally be of the form (VALUEFORM), which is
| evaluated and checked for nil; i.e. SYMBOL can be omitted if only the
| test result is of interest.  It can also be of the form SYMBOL, then the
| binding of SYMBOL is checked for nil.

create.  These interpretations had been added later, but they collide
with the special handling of the (SYMBOL SOMETHING) syntax that the
original `if-let' supported.

Michael.





  reply	other threads:[~2023-01-14 16:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 19:21 bug#60758: 29.0.60; while-let uses if-let* convention in contradiction to the docstring Daniel Mendler
2023-01-13  0:37 ` Sean Whitton
2023-01-13  5:36   ` Daniel Mendler
2023-01-14 15:31     ` Michael Heerdegen
2023-01-14 15:35       ` Daniel Mendler
2023-01-14 16:11         ` Michael Heerdegen [this message]
2023-01-14 16:29           ` Daniel Mendler
2023-01-14 16:25       ` Sean Whitton
2023-01-14 16:35         ` Eli Zaretskii
2023-01-14 21:13           ` Sean Whitton
2023-01-14 22:13             ` Michael Heerdegen
2023-01-15  7:38               ` Eli Zaretskii
2023-01-15 17:02                 ` Sean Whitton
2023-01-16 17:55                   ` Michael Heerdegen
2023-01-16 20:36                     ` Sean Whitton
2023-01-17 12:46                       ` Michael Heerdegen
2023-01-14 16:58         ` Michael Heerdegen

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=87o7r1p03t.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=60758-done@debbugs.gnu.org \
    --cc=60758@debbugs.gnu.org \
    --cc=mail@daniel-mendler.de \
    --cc=spwhitton@spwhitton.name \
    /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).