I dont mean to flame you all, but I just need to defend my
favorite language and its really great features
Thats correct if you use RTTI, but I dont, and I dont think
many ppl do either, as you can still work around it,
In fact RTTI is one of the most cool things in the OO
programing - the performance difference between writing virtual
function which returns something like class id and using
dynamic_cast is negledible and dynamic_cast is really far more
and you only ever need it if you use multiple inheritance,
which IMHO if you’re using, you need to redesign your class
Multiple inheritance is more than great - using it with RTTI
gives you ways to split up large classes in more elegant
parts, to reuse code better, to make and check interfaces and to reduce compile times in large projects. However virtual multiple inheritance is in fact dangerous and should be used carefully.
I dont use templates much either, they do increase code size,
but thats all.
In fact they do it, but that it is not all
Using templates is superior to writing macros - it much more safe, easy to debug, and in the case of a good compiler, you have perfomance even better compared to C! Look at SGI STL. STGL and most ot the contemporary math libraries are writen with templates.
C++ is the future, its fast, efficient, and easier to use on big
projects. Get used to it.
I completely agree with this
Where are the problems:
Bad implementations with many compilers - especialy on templates. exceptions are cool, but too slow. Changes in interfaces, basic classes imply long compile times(Java is very cool here). streams are very slow really implemented - use printf, fprintf and etc…
This is really very brief defence of C++ and its features - I can talk one night about this, if I had the time