[Top][All Lists]

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

Re: if-let/if-let*/and-let/..

From: Michael Heerdegen
Subject: Re: if-let/if-let*/and-let/..
Date: Wed, 07 Mar 2018 15:15:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Then please convince me by telling more about this.  The log message
> vaguely mentions some warning problems, but doesn't tell any details,
> and the discussion was on emacs-devel, not the bug tracker.  Help in
> understanding why this is important to have now (or at all) will be
> appreciated.


In the beginning, we had if-let and when-let in subr-x (that's the state
of the last release).  Then we added and-let and decided to port the
extended syntax of and-let to if-let and when-let.  In a single special
case ("single binding tuple"), the new syntax was incompatible with that
of when-let and if-let, so we decided to introduce new names if-let* and
when-let* (which some of us preferred over the old names anyway) and
declared if-let and when-let obsolete.  That's the state of the emacs-26
branch without my suggested patch.

We then have seen that this was a mistake, there were lots of
complaints.  The problem is that whenever a file uses foo-let (and those
are much more than we had estimated), you get a lot of compiler warnings
about using an obsolete thing.  But people can't just use the new forms
because that would not be backward compatible with older (25.x) Emacs

With the current state of the emacs-26 branch, we would still declare
foo-let obsolete, although we already know that we will revert this in
the subsequent release.  If we leave things as they are now, we would
cause a lot of confusion and trouble for nothing: to get rid of the
numerous warnings, people have began to remove occurrences of foo-let
from their files or turn off compiler warnings in their packages
completely.  Very bad, and needless.  Lot's of packages would have to be
changed for no gain.

My commit is a tiny change that deobsoletes foo-let and readjusts things
so that foo-let* are aliases for foo-let.

But yes, the commit touches the foo-let.  As a compromise, we could also
just deobsolete foo-let to avoid the confusion, and install the
suggested change to master.  Though, that would still not be optimal,
because we would install a version of foo-let* that we will not keep in
the subsequent releases, so it would still cause a lot of trouble and

FWIW, the change is well tested, and I had a look at each affected
occurrence of foo-let in the Emacs code base (which are not very many),
if that matters.


reply via email to

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