Comment by jimbob45
3 years ago
While that’s true, preprocessors are pretty trivial to write these days if you want macros that the language doesn’t support. Racket excels at this.
3 years ago
While that’s true, preprocessors are pretty trivial to write these days if you want macros that the language doesn’t support. Racket excels at this.
Which preprocessor do you recommend for writing C?
None.
Use an actual different language. Ada, Rust, Zig, D, Lisp/Scheme/Racket, Tcl, Forth, etc. ... something other than C.
Don't preprocess C into a slightly broken other language that you wish it were. Use C as C, or use something else.
https://stackoverflow.com/a/3685576
There’s one approach. I wouldn’t personally recommend using macros outside of include guards and file inclusion. Still, if you need more functionality, the methods exist.