News for hackers. Stuff that matters.
Re:Learning that you can use unions in C for grouping things... by Spivak on Sunday August 01, 2021 @04:20PM (#28029520)
Doesn’t work in a lot of cases unfortunately. If you’re writing a library designed to be consumed by other languages you’re stuck with writing C abi compatible code which can be written in other languages that can “extern” them but it puts limits on what’s possible in those libraries.
Re:Learning that you can use unions in C for grouping things... by WalterBright on Sunday August 01, 2021 @11:32PM (#28032604)
One thing I do is to make my own interface to the 3rd party library with the ugly interface. Then that interface file is only one that sees it.

It also may be true that one can't replace every use of the preprocessor. That shouldn't stop replacing what one can.