Recently i had a discussion with my boss (a long time C developer) who discouraged me in using C++ streams and stick to “good old” printf & friends. Now i can understand why he is saying this and believe me i did not follow his advice.
But still this is bugging me – are there things in C that are still better in some cases than newer C++ implementations of the same/similar thing? By better i mean for example performance, stability or even code readability/maintainability. And if so, can someone give me examples? I’m mainly talking about similar differences like printf/streams, not about features like inheritance or OOP for that matter. The reason why i’m asking all this is that i consider myself a C++ developer and as such I always try to code the C++ way.
C printf()-style output is typically faster than C++ ostream output. But of course it can’t handle all the types that C++ output can. That’s the only advantage I’m aware of – typically, because of aggressive inlining, C++ can be a lot faster than C.