S
Scott Brady Drummonds
Hi, all,
I'm finding that in my new project I have developers that have been
developing in C++ for many years but they default to C code in most places.
As such, our code is C++ by compiler, but tends to be C by design and
appearance. As examples, they're used to using character prefixes for
library function and variable names instead of namespaces, favoring *printf
to streams and stringstreams, avoiding exceptions in favor of overloading
return values, and avoid the STL in favor arrays, character buffers, and
hand-rolled containers.
Most of the reasons for which I have chosen the C++ path in these decisions
lie in my own comfort level with the language. There are some clear
benefits of choosing C++ over C for some of these decisions (STL reliability
and robustness over char * comes to mind) but some of my choices seem to be
more about personal preference than correctness (using namespaces instead of
prefixes for library functions/variables).
I'd like to educate myself on the pros and cons of each of these and other
C/C++ decisions. I do have several books on C++ but none really attempt an
objective analysis of each of these features. Many rely on the notion of
"this is how you do it in C++". Unfortunately, that argument doesn't carry
weight with my coworkers.
Can anyone recommend a good source for this information? Books are better
than web pages, but at this point I'll take anything I can get.
Thanks!
Scott
I'm finding that in my new project I have developers that have been
developing in C++ for many years but they default to C code in most places.
As such, our code is C++ by compiler, but tends to be C by design and
appearance. As examples, they're used to using character prefixes for
library function and variable names instead of namespaces, favoring *printf
to streams and stringstreams, avoiding exceptions in favor of overloading
return values, and avoid the STL in favor arrays, character buffers, and
hand-rolled containers.
Most of the reasons for which I have chosen the C++ path in these decisions
lie in my own comfort level with the language. There are some clear
benefits of choosing C++ over C for some of these decisions (STL reliability
and robustness over char * comes to mind) but some of my choices seem to be
more about personal preference than correctness (using namespaces instead of
prefixes for library functions/variables).
I'd like to educate myself on the pros and cons of each of these and other
C/C++ decisions. I do have several books on C++ but none really attempt an
objective analysis of each of these features. Many rely on the notion of
"this is how you do it in C++". Unfortunately, that argument doesn't carry
weight with my coworkers.
Can anyone recommend a good source for this information? Books are better
than web pages, but at this point I'll take anything I can get.
Thanks!
Scott