unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master de6b1e1efb1: Replace XSETSYMBOL with make_lisp_symbol
Date: Sun, 03 Mar 2024 08:52:09 +0200	[thread overview]
Message-ID: <86zfvfolie.fsf@gnu.org> (raw)
In-Reply-To: <jwvzfvgfggn.fsf-monnier+emacs@gnu.org> (emacs-devel@gnu.org)

> Date: Sat, 02 Mar 2024 16:57:28 -0500
> From:  Stefan Monnier via "Emacs development discussions." <emacs-devel@gnu.org>
> 
> >> 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.
> >
> > This is your stylistic preference, which I don't share, probably
> > because I'm biased by many years of staring on Emacs code that uses
> > such macros everywhere.
> 
> I don't have a strong opinion about whether we should keep the XSETFOO
> style of macros, but I've been annoyed several times in the past at the
> need to introduce a "tmp" local var just to do
> 
>     XSETFOO (tmp, mything);
>     ... tmp ...
> 
> which can turn from merely inconvenient and ugly to almost impossible
> when such code needs to be used in an expression macro, which we can't
> really introduce such local variables.  For that reason, I started
> using `make_lisp_ptr` and things along these lines.

I understand this as a general principle and share it, to a degree.
But it is a weak reason, and so in this case the muscle memory takes
precedence.  I'm still recovering from the
XINT/XFASTINT/XSETINT/XFIXNUM/XFIXNAT change, but in that case it was
at least justified by the addition of bignums.

So I'd like to revert this changeset, and I'm asking everyone to
please not remove the XSET* macros unless we are adding new types or
redesigning the existing ones.



      reply	other threads:[~2024-03-03  6:52 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
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 [this message]

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=86zfvfolie.fsf@gnu.org \
    --to=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).