Re: Casting always bad?
* Ron Natalie:
Alf P. Steinbach wrote:
Engineering decisions always have to account for context. For example,
if you're using an old, antiquated application framework like MFC that
provides its own RTTI functionality, relying on a compiler such as
Visual C++ where standard C++ RTTI is turned off by default, then it
might not be such a good idea to start using standard C++ RTTI.
Visual Studio hasn't default turned off RTTI in several major versions.
I tested this now to be absolutely sure.
Test performed using Visual Studio 7.1, default MFC project.
And sorry, your statement is factually incorrect.
Nobody, not even Microsoft, holds up MFC as a fine example of C++ class
design.
Right. ;-)
However, even back in the versions where RTTI was default off,
turning it on had no impact on MFC.
Good to hear, if correct, but irrelevant for what I wrote.
We've got a million lines of code
in our product and it uses MFC for just about all the user interface.
We also rely on RTTI. There is no problem.
Good to hear, but irrelevant for what I wrote.
Cheers,
- Alf
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]