Re:Strong Types and Their Impact on Testing
by AnimalMuppet on Tuesday November 18, 2014 @03:58PM
(#8626307)
Argh. I forgot that C doesn't do name mangling. Most of those problems go away in C++, though (he said hopefully, but without complete confidence...)
Re:Strong Types and Their Impact on Testing
by mikeash on Tuesday November 18, 2014 @04:10PM
(#8626371)
The problem of mismatched prototypes goes away (except for extern "C" functions, of course) but then you get fun stuff like fragile base classes. If you have a base class in a library and a subclass in an application that links against that library, you can never add a virtual function to the base class again without breaking backwards compatibility (and causing all sorts of accidental type-punning chaos when you try to call methods).
I agree that type promotion isn't the same, but I didn't mention that anyway....