From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: master de6b1e1efb1: Replace XSETSYMBOL with make_lisp_symbol
Date: Sat, 24 Feb 2024 21:54:39 +0100 [thread overview]
Message-ID: <D0AB4A35-8764-430D-B9DE-728A64BBB196@gmail.com> (raw)
In-Reply-To: <86plwlyb5a.fsf@gnu.org>
24 feb. 2024 kl. 19.23 skrev Eli Zaretskii <eliz@gnu.org>:
> Why is this a good idea? We have those XSET* macros in Emacs since
> time immemoriam; why remove them now?
There is no longer any reason for having those macros now, nor has there been for a very long time. Several uses of XSETSYMBOL were eliminated in the obarray renovation so this is just me finishing that part of the job. We did the same with XSET_HASH_TABLE and it was a clear improvement.
More in detail, `a=f(b)` is inherently simpler, more transparent, concise and composable than `X(a,b)`. It is obvious to the reader that it's an assignment and that `a` is only modified, `b` not at all and is only evaluated once. There is no need for an assignment at all if the result is used elsewhere.
Another reason for removing remaining uses of the macro is that then the macro itself can be removed, which in turn ensures that no new uses of it will appear.
next prev parent reply other threads:[~2024-02-24 20:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-24 18:23 master de6b1e1efb1: Replace XSETSYMBOL with make_lisp_symbol Eli Zaretskii
2024-02-24 20:54 ` Mattias Engdegård [this message]
2024-02-25 5:53 ` Eli Zaretskii
2024-03-02 21:57 ` Stefan Monnier via Emacs development discussions.
2024-03-03 6:52 ` Eli Zaretskii
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=D0AB4A35-8764-430D-B9DE-728A64BBB196@gmail.com \
--to=mattias.engdegard@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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).