bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60758: 29.0.60; while-let uses if-let* convention in contradiction t


From: Michael Heerdegen
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
User-agent: Gnus/5.13 (Gnus v5.13)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]