News for hackers. Stuff that matters.
Re:C Preprocessor Hell by anon_d on Thursday January 12, 2012 @11:15AM (#3456804)
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.
Re:C Preprocessor Hell by angersock on Thursday January 12, 2012 @12:14PM (#3457063)
...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.)

Re:C Preprocessor Hell by anon_d on Thursday January 12, 2012 @12:18PM (#3457083)

    >> 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.