From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: xenodasein--- via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Thoughts on replacing macros with static inline functions Date: Tue, 15 Nov 2022 16:54:02 +0100 (CET) Message-ID: References: <87tu30fhut.fsf@yahoo.com> Reply-To: xenodasein@tutanota.de Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10177"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Brent Pappas , "emacs-devel@gnu.org" To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 15 16:56:03 2022 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 1ouyI7-0002Oy-0n for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Nov 2022 16:56:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouyGG-0007o7-2D; Tue, 15 Nov 2022 10:54:08 -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 1ouyGD-0007m4-OK for emacs-devel@gnu.org; Tue, 15 Nov 2022 10:54:05 -0500 Original-Received: from w4.tutanota.de ([81.3.6.165]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouyGC-00036O-6c for emacs-devel@gnu.org; Tue, 15 Nov 2022 10:54:05 -0500 Original-Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 6705A106016D; Tue, 15 Nov 2022 15:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1668527642; s=s1; d=tutanota.de; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=dnGYqgpNuPacCUlwXlceVPtOqH+G/5cAa8ToKZ3ouAk=; b=ebSTNw0Tg05H94CMCvGr2RSxRl8abB1o5pCzdIsDRlTX6HagzOoRY9mX0RkBE3vX zXWLHP9dP8XoJqQyXs6v4ZKV751VCz8k9TEQpNEllo9T+9ILvuAjsv+dCqT0sWDijRl Om3e4TKLOwX9vRtKg4/VU6a2PLJV3V6XsvVVENgylVVYwtWrpG76qACMeiqRFqKH1XB GtaheKbo7SZ/QnyolawM6eNnSET3rde8+uqNT3k+oCXEX0jXD2i8yWQpvqHvuURd9Y8 BvJaMTOFJchs7uvLBjZZ0bs1cd4yVOQiyfP2ftiHbDceCU94C0ETwPppZCiQlxi0g1o V6XLdeemPQ== In-Reply-To: <87tu30fhut.fsf@yahoo.com> Received-SPF: pass client-ip=81.3.6.165; envelope-from=xenodasein@tutanota.de; helo=w4.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:299853 Archived-At: Nov 15, 2022, 13:49 by luangruo@yahoo.com: > Brent Pappas writes: > >> Title: Thoughts on replacing macros with static inline functions >> ... >> >> > I find that rather ugly. PAD is an example of an extremely trivial > expression that should really be a macro. > >> How interested would the Emacs community be in porting macros to functions? >> > > Not very, in this case. That exact PAD macro is not only an idiom used > throughout the Emacs X11 code, it is more-or-less an idiom of the entire > X Window System, copied around and used extensively throughout the X > sample server, Xlib, and C-language clients. > > In addition, we try to avoid undue changes to working code, so giving > carte blanche to change macros to static functions is not something we > really want to do. But if you want to do that to a few big, ugly, > macros around an area in which you are making actual changes, please go > ahead. > You answer in a tone that means you speak for everyone else, is this intentional if so why?