unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: master b72f885: Make dlet work like let, not let*
Date: Tue, 3 Aug 2021 17:21:14 +0200	[thread overview]
Message-ID: <74C5058D-AF5C-4F1A-8D08-251935A69693@acm.org> (raw)
In-Reply-To: <837dh2mz57.fsf@gnu.org>

3 aug. 2021 kl. 15.33 skrev Eli Zaretskii <eliz@gnu.org>:

> People out there use Emacs 28 for a long time, so of course there is a
> compatibility problem, albeit a smaller one than if we have already
> had released Emacs with dlet.

Of course, but that's not really a compatibility promise but merely being nice, which we of course try to be but I'm quite sure that our esteemed Emacs 28 users understand that we didn't give them an iron-clad guarantee.

The change itself is also low-risk: it's an esoteric function and I've found no use of it anywhere outside the Emacs tree -- I did search. Furthermore, even inside Emacs all uses were found to be insensitive to the let/let* binding semantics.

However you do raise a good point. For incompatible changes in official releases we have etc/NEWS, but nothing really like it for things that we just broke on master. Perhaps it would be useful to have a document tracking these things so that everyone doesn't have to read every git diff to understand what is going on? `etc/NEWS.development`, say?

> Could you please tell what were the reasons that led you to make this
> change?  Because I don't really understand the motivation.  Is it just
> the name that lacks the '*' part, or is it something else?

Well sort of: if someones finds out about a construct named `dlet`, it's just natural to assume that it binds like `let`, not like `let*`. (Supporting evidence: two local macros on the pattern `something-dlet*` were in use. One of the has now been renamed.)

There is also the possibility of someone finding it useful to have a version with `let`-like binding (which is a more fundamental operation, after all). What would such a macro be called? `dlet*` would be terrible.

Furthermore, the subtle difference in semantics can lead to even subtler bugs: a dependency that is overlooked may not actually cause trouble until much later. Consider

(dlet ((case-fold-search t)
       (my-dynamic-variable EXPR)
  ...something that requires both bindings above...)

If the programmer thought in `let` terms and didn't consider the effects of case-fold-search on EXPR, he wouldn't have thought to test it with input that would exercise such a dependency.




  reply	other threads:[~2021-08-03 15:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 16:10 master b72f885: Make dlet work like let, not let* Eli Zaretskii
2021-08-03 13:03 ` Mattias Engdegård
2021-08-03 13:33   ` Eli Zaretskii
2021-08-03 15:21     ` Mattias Engdegård [this message]
2021-08-03 15:58       ` Eli Zaretskii
2021-08-03 17:19         ` Stefan Monnier
2021-08-03 17:50           ` Eli Zaretskii
2021-08-03 18:50             ` Stefan Monnier
2021-08-04 11:27               ` Eli Zaretskii
2021-08-04 11:35                 ` Lars Ingebrigtsen
2021-08-04 11:46                   ` Mattias Engdegård
2021-08-04 12:16                     ` Eli Zaretskii
2021-08-04 12:48                       ` Mattias Engdegård
2021-08-04 12:15                   ` Eli Zaretskii
2021-08-04  3:09             ` Michael Heerdegen
2021-08-04 11:40               ` Eli Zaretskii
2021-09-20 17:08                 ` Jean Louis
2021-09-20 17:02       ` Jean Louis
2021-09-20 16:56 ` Jean Louis
2021-09-20 19:16   ` Tassilo Horn
2021-09-21  4:19     ` Jean Louis
2021-09-21  6:31       ` Tassilo Horn
2021-09-21  7:17         ` Jean Louis
2021-09-21  7:50           ` Tassilo Horn
2021-09-21  9:31             ` Jean Louis

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=74C5058D-AF5C-4F1A-8D08-251935A69693@acm.org \
    --to=mattiase@acm.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --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).