Re:Readability Advantages of C over C++
by loup-vaillant on Tuesday May 31, 2011 @10:05AM
(#2602622)
> I sorely miss [the STL] when programming in C.
Well, C++ got at least one thing right: deciding to support parametric polymorphism (or "genericity"). Templates are quite ugly, but at least they do the job.
This can lead to some interesting errors. For example, writing
void foo(const std::string s)
by mistake, instead of
void foo(const std::string &s)
won't result in a compiler error, but will result in an unusually large, and unexpected overhead in calling foo.
On the other hand, STL is great (less the error messages). I sorely miss it when programming in C.