Theme 1 – Desire for compile‑time/generic features in C
Many commenters admire David Priver’s work on C templates, reflection, and _Generic tricks, and they wish for more compile‑time capabilities.
- rramadass: “Also see Templates in C by David Priver … He also has other interesting C techniques, namely; Adding reflection to C … Generic for Type Reification in C … I really like his style of writing and presentation; concise and precise.”
- warmwaffles: “I do wish to see comptime stuff in C some day. Or at a minimum your defblock implemented.”
- uecker: points to a proposal for #def / #enddef as a way to add block‑level macros.
Theme 2 – C macro hacks vs. C++/other languages for generic data structures
The thread debates whether macro‑based solutions in C are preferable to using C++ (or newer languages) for type‑safe containers.
- pornel: “It's not worth it… Users of C either like it exactly the way it is, or have to use a specific C version due to a vendor dependency or compliance. An upgraded C not approved by the standards body gives you yet another niche language that is not C, but is still burdened with its old flaws.”
- jstimpfle: “C++ containers are designed for average demands… For anything more demanding it's horrifically bloated and bad… It's better than messing with macros in pure C.”
- ActorNightly: “you can just write a library for all the stuff you need… This stuff is just syntactic sugar.”
Theme 3 – Compatibility and the risk of straying from standard C
Several participants stress that C’s strength lies in its stability, wide compiler support, and familiar semantics; breaking compatibility creates a niche language that loses those advantages.
- pornel (again): “As soon as you change anything in a breaking way… you end up losing the things that keep C alive.”
- accelbred: “At the point you clean up the syntax, you're not really C with extensions anymore.”
- FullGarden_S: “C3 might be it because C3 has full C ABI compatibility … unlike most modern C‑like alternatives, it checks out.”
These three themes capture the core of the discussion: enthusiasm for advanced compile‑time features in C, the trade‑off between C macro tricks and higher‑level languages for generic programming, and the importance of preserving C’s compatibility and simplicity.