"Steven T. Hatton" <su******@setidava.kushan.aa> wrote in message news:<4J********************@speakeasy.net>...
I often encounter statements in documentation or comments in source code
that says things along the lines of "not all compilers support X, so we did
not use it." X might be namespaces, dynamic_cast, templates, RTTI, etc. Is
this a common situation for a lot of C++ development? Are there some major
platforms that lack good C++ compiler support?
Sometimes I have the sense the guideline or decision was made years ago, and
never revised to address progress in compiler support. Is that a likely
scenerio?
Your suspicion, that there is an old decision involved, is probably
based in good solid fact. Many shops will have old compilers, or
they will have old code that only compiles on old compilers, etc.
Managers often see the effort to update old code as a waste. In
*some* cases, they may be right. If somebody wants to rewrite code
for the single purpose of updating it to a new coding standard,
the chances are good it's not worth it.
I have a set of rules.
- If the users (clients, etc.) are not complaining, and
- The software satisfies the specs, and
- Nothing in particular is messing up downstream, then:
don't change that code without a good reason. It's a lot of
effort to rewrite code, and you may introduce new bugs doing it.
So there may well be some ancient dinosaur of a compiler involved.
For another angle on it, someplace in one of the "big name" books
I read a story about the ubercoder. The new hire was very sorry to
have missed him, because the ubercoder had made it a point of pride
to use every single feature of the coding language in every single
project he worked on. Ubercoder knew every jot and line of the
standard, and had crawled over every nut-and-knob of the compiler,
and could make things happen that nobody else even suspected.
The new hire would have really enjoyed meeting ubercoder, excpet
he had been fired the week before the new hire started.
Socks