News for hackers. Stuff that matters.
Re:What type of Machine is the C Preprocessor? by NAFV_P on Monday January 27, 2014 @05:14PM (#7133700)
A few months ago I got fed up with losing track of what I had written in C. So I knocked up some python scripts to write templates for me, it displays the date and time the file was created and the filename in a comment. This concept can be taken much further.

CPP has been known to be abused by programmers as a general text processor, has anyone else started using another language to help them write C?

Re:What type of Machine is the C Preprocessor? by akjj on Monday January 27, 2014 @05:34PM (#7133836)
C++ and Objective-C both began as preprocessors for C.
Re:What type of Machine is the C Preprocessor? by NAFV_P on Monday January 27, 2014 @06:26PM (#7134135)
Wow, it's surprising what you can do with it.
Re:What type of Machine is the C Preprocessor? by tbirdz on Monday January 27, 2014 @07:45PM (#7134457)
Just to clarify a bit, C++ and Objective were not written in the C pre-processor, but rather implemented as their own pre-processor program, analogous to Qt's moc.
Re:What type of Machine is the C Preprocessor? by craigching on Monday January 27, 2014 @09:46PM (#7134987)
Yes like Cfront [1]. I used that back in the day, the pain of it caused me to rewrite all my C++ in C though :p Call me a coward!

[1] -- http://en.wikipedia.org/wiki/Cfront

Re:What type of Machine is the C Preprocessor? by NAFV_P on Tuesday January 28, 2014 @04:43AM (#7136236)
> Just to clarify a bit, C++ and Objective were not written in the C pre-processor, but rather implemented as their own pre-processor program, analogous to Qt's moc.

I bet these pre-processor programs were themselves written in C.

Re:What type of Machine is the C Preprocessor? by ChuckMcM on Monday January 27, 2014 @06:03PM (#7134030)
You mean like $ SCCS %G% %M% %W% $ ?
Re:What type of Machine is the C Preprocessor? by jfb on Monday January 27, 2014 @06:27PM (#7134141)
Good times. I used to have emacs mode hooks that ensure that "$Id$" was written into files. I don't miss that.
Re:What type of Machine is the C Preprocessor? by ChuckMcM on Monday January 27, 2014 @10:12PM (#7135076)
In what I considered minor blasphemy one of my friends wrote git-hooks to keep using them.
Re:What type of Machine is the C Preprocessor? by NAFV_P on Monday January 27, 2014 @06:30PM (#7134153)
Cheers, your comment has just fried my neurons.