FWIW, the maze of #ifdefs are often awful, but C doesn't *have* to be like that. In the Plan 9 world, we support a bunch of processors types without resorting to that, and Plan 9 from User Space extends that model to run on top of a collection of processors and different operating systems, similarly making minimal use of the preprocessor to do it.

Unfortunately, POSIX pushed the #ifdef model and most everyone else followed suit. It's a shame; a better world is possible.

On 8/18/26 16:26, George wrote:
Hi All, I'm in the process of converting Zangband (1990s) over to Linux
with sound. Linux sound was a nightmare for a long time. Anyhoo, the
original portable conversion is in C. The preprocessor macros (#define
THIS, #ifndef THIS, etc.) are a convoluted nightmare. There's over 3000!
Most are just game constants, but a lot are system specifics for the
makefiles. I'm not a python guy, and don't get me started on Javascript,
but now I realize why all the youngins hate it so much. Even slow growth
eventually leads to bloat. I don't want to sound like conspiracy nutter;
but I'm seeing this progress bloat pattern everywhere; cars, laws, food,
girlfriends, private equity. I'm now just getting comfortable with C, I
don't want to have to learn RUST. -gbk

Reply via email to