From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26910 invoked from network); 26 Nov 2023 22:54:43 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 26 Nov 2023 22:54:43 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 9front; Sun Nov 26 17:52:54 -0500 2023 Received: from abbatoir (pool-108-6-24-2.nycmny.fios.verizon.net [108.6.24.2]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 330b2ec2 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Sun, 26 Nov 2023 14:52:53 -0800 (PST) Message-ID: <8C8881A0ADB4FC714B2D0DBD3F1D1D7A@eigenstate.org> To: 9front@9front.org Date: Sun, 26 Nov 2023 17:52:52 -0500 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: enhancement engine singleton-aware reduce/map database Subject: Re: [9front] [PATCH] Fix assert macro to not break on commas Reply-To: 9front@9front.org Precedence: bulk Quoth Blue-Maned_Hawk : > On 11/26/23 13:13, ori@eigenstate.org wrote: > > Quoth Blue-Maned_Hawk : > >> I'm just new around here. > > > > In general, we try pretty hard to avoid doing stuff > > in macros. There are places where it's unavoidable, > > but excluding ape, there's more #ifdef in ghostscript > > than in the rest of the system combined. > > > > I don't understand why you're bringing up ifdefs. That's a completely > different part of the preprocessor, unrelated to macros (though usable > in combination with them). > > What reason have y'all for avoiding macros? Well, the fact that you need hacks like the one that started this thread, for one; what if you had macro that took *two* arguments? #define assert_msg(cond, msg) \ ...what here? I don't see how you can avoid just saying "it's a macro, it's going to be weird, don't even try".