bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Module with preprocessor utilities


From: Bruno Haible
Subject: Re: Module with preprocessor utilities
Date: Mon, 20 Jul 2020 23:24:22 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

Marc Nieper-Wißkirchen wrote:
> For example, do we want to encourage the writing of
> sophisticated macros like the TRACE macros in chapter 16 of (the IMHO
> opinionated) book Modern C ([1]).

This TRACE macro is an interesting academic example. I say "academic",
because who wants a trace statement that outputs only numbers, no string
arguments? And once you allow string arguments, you notice that you need
a varargs function, not a macro.

> In that case, we don't want to write STRGY or ALEN everytime.

The ALEN macro is reasonable: usable in many situations, and easy to
understand.

> [1] https://gforge.inria.fr/frs/download.php/latestfile/5298/ModernC.pdf

Will I learn something by reading this book, or will it spoil me? :-)

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]