From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master de6b1e1efb1: Replace XSETSYMBOL with make_lisp_symbol Date: Sun, 25 Feb 2024 07:53:06 +0200 Message-ID: <86il2dxf7h.fsf@gnu.org> References: <86plwlyb5a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14203"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 25 06:54:02 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1re7Sb-0003Qp-8X for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Feb 2024 06:54:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1re7Rm-0008Ch-PQ; Sun, 25 Feb 2024 00:53:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1re7Rl-0008CY-3M for emacs-devel@gnu.org; Sun, 25 Feb 2024 00:53:09 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1re7Rk-0000Ih-6u; Sun, 25 Feb 2024 00:53:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/PGsC7f616DFakja59t3iPWWn2W79blUZvWzvVZAb1k=; b=Z1ALzYHU+N2F/W7fHrp3 uzTz5Fpfk+SHo3mpm8Pina087ng2jVl1Ws6fOfQ3ub0aZCBcUcwuiINOUReEXUkdFmwlny0D6C0E5 89k7oWhB14FGXK89OWNx4UxWAaR/btYL1EVh37qXikpxrmN1CfTr8mPIbI5UHYzwQmSMIaG+lBuz7 OzU6J0LFCsbbY+BeXJgrBViP53p3s/A/UbQr6swuUhvHYDGixr6t+YiYyi26ZQTIW9AeyQVRYvWSw UM2gyYJKoEHYAzxHxSTngYr5iR0UyFwN4w+XGK3+TAcXuoPFkw6IjGCrwbt5aWIyVSi3O0s0/1kcx c3Xro3Y3oBJuCw==; In-Reply-To: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 24 Feb 2024 21:54:39 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316504 Archived-At: > From: Mattias EngdegÄrd > Date: Sat, 24 Feb 2024 21:54:39 +0100 > Cc: emacs-devel@gnu.org > > 24 feb. 2024 kl. 19.23 skrev Eli Zaretskii : > > > 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. Maybe not for you, but for those like me who are hacking on Emacs for many years, there is a significant reason: the familiarity with the Emacs sources and the knowledge of how certain things are done in Emacs that is burnt into our muscle memory. > 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. So unless you can point out some serious disadvantage of these macros, I think we should revert that commit, and refrain from doing similar changes with other XSET* macros we have, at least until the last of us dinosaurs leave Emacs development. TIA.