Type Safe Generic Data Structures in C (2025)

danielchasehooper.com

124 points by AlexeyBrin 2 days ago


Panzerschrek - 7 hours ago

I don't understand people reinventing macro-based hacks in C to achieve what was achieved in other languages many years ago. Why not using C++, for example? It's available almost everywhere, introducing its usage in an existing C codebase is pretty simple. Sure, C++ has its own downsides, but is it better to create mess with macros in C rather then using exiting language facilities and standard library containers provided by C++?