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 37889523278: Add new `swap` macro and use it Date: Sat, 13 Jan 2024 11:14:27 +0200 Message-ID: <83il3xh9xo.fsf@gnu.org> References: <170452579053.27998.16123231327386305897@vcs2.savannah.gnu.org> <20240106072311.28B8FC0034E@vcs2.savannah.gnu.org> <87plye9ahs.fsf@yahoo.com> <83o7dyua0d.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31776"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 13 10:15:51 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 1rOa7L-00082K-9O for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Jan 2024 10:15:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOa6c-0005DU-Nk; Sat, 13 Jan 2024 04:15:06 -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 1rOa6a-0005DM-Qt for emacs-devel@gnu.org; Sat, 13 Jan 2024 04:15:04 -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 1rOa6a-0007oD-FU; Sat, 13 Jan 2024 04:15:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZTLBI+qPG6HiKqrIEczmMygJLs/WCxRns9c7mjZJhiU=; b=aSzXcfqSGOmr yMlIrDG/XFg3kfeLviZW18XlIC9AVSX2kxmjxQ0rllO7kimagUCXRW9NLk8z/diXOh20B69n2ciLr WCZW9ckznwUxpKDdaXWOPV8s7M0/5ynGxRuPogMwYtdjfP/o2nZ0grXAsP2kwo6ITy1dnGuc8bxqe 6YSGYpYj1TQ6I0KUUgiRO3cqf1/yGT7OKbT4ph6ycL93Qfno+pJl6XVdPwOKMfUac/IjiOtuLn1Dl noWjRLJU3iDklsZiwpLsu8VFRbDYkyVTny0DyTnOnT7MOjoI0yIVsVpRXK/KsWi41k1V6SwH2EJ0h Jk7S6PcKEdf6D/lIPtSPaQ==; In-Reply-To: (message from Stefan Kangas on Sat, 13 Jan 2024 02:02:53 -0600) 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:314924 Archived-At: > From: Stefan Kangas > Date: Sat, 13 Jan 2024 02:02:53 -0600 > Cc: emacs-devel@gnu.org > > Eli Zaretskii writes: > > > Regardless of portability issues, I think the macro should be called > > SWAP, upper-case, to avoid clashes with functions. > > Upper case more conventional for a macro, indeed. I consider these > three as exceptions: min, max, swap. The former two, we already have. min and max are standard names defined in many system headers. So they are exceptions rather than the rule. > But I won't insist on using lower case also for `swap`, if you think > it's better not to. > > Do you think it's worth changing upper case function names to lower case > also? I find lower case names makes code more readable. They are upper-case because they were macros once, and we kept the letter-case for that reason.