Also:
- for ‘generics’: X macros (https://en.wikipedia.org/wiki/X_macro, if desired in combination with _Generic (https://en.cppreference.com/c/language/generic), or use C++, if desired with linting that rejects use of some features.
- for RAII: I think ‘defer’ is in the pipeline. Not quite the same, but useful anyways. gcc and clang already support it (with not-so-nice syntax; see https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Common-Variable..., look for cleanup)
Also:
- for ‘generics’: X macros (https://en.wikipedia.org/wiki/X_macro, if desired in combination with _Generic (https://en.cppreference.com/c/language/generic), or use C++, if desired with linting that rejects use of some features.
- for RAII: I think ‘defer’ is in the pipeline. Not quite the same, but useful anyways. gcc and clang already support it (with not-so-nice syntax; see https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Common-Variable..., look for cleanup)