Re:C++ in Coders at Work
by cturner on Friday October 16, 2009 @11:29AM
(#885534)
Have there been experiments with creating a pre-compiler that checked that you were using a subset of C++? What downsides would this have (other than longer compile time)?
[ Parent
| on HN ]
But which subset ?
When I program in C++ (and sometimes you have to) there are features that I'll avoid like the plague, once bitten, twice shy.
In fact, my subset of C++ was usually try to stay as close as you can to C and use C++ when you have to. That seemed to be a pretty safe route.
Most of my C++ stuff was using Borland C++ Builder or Microsoft visual C++, I'm happy to say I no longer have to support software for the windows platform, so no more C++ for me.
I try to stay as close to C as possible. But C++ has many temptations. If you start using boost, for example, you will be in no time using features of C++ that are not even in the standard yet :-))
I just use gcc to compile the code. That way I know what subset I am using and the rest of the code is using.
The google style guide posted elsewhere in this thread links to this:
http://google-styleguide.googlecode.com/svn/trunk/cpplint/cp...