6 ms·
Yep. Why try to force a tool into a role it was never designed for? You use m4 or just write a preprocessor in any language. If you really want to do complicate
by anon_d 15y ago
Yep. Why try to force a tool into a role it was never designed for? You use m4 or just write a preprocessor in any language. If you really want to do complicated lisp-style meta-programming stuff with C, just write another C program to pre-process your C program. It's more work, but it gives you complete control over the syntax.
- angersock 15y ago...or just use Python, Ruby, or Lisp directly? Doing weird things to a C file (while occasionally useful) is just increasing the technical debt of your teammates later. (though, we do have a closure-ish macro in our codebase that's pretty nifty, so do as I say not as I do etc.)
- anon_d 15y ago>> If you really want to do complicated lisp-style meta-programming stuff > Increases technical debt Yep. The sane solution is to just not do stuff like this at all. In rare situations it ends up being worth it.