Chris Baus

Google's Joe Beda: Templates make C++ libraries worse

Joe Beda from Google has some straight up comments on state of C++. As a working C++ programmer, I agree point for point.

I think that there is a disease where people think that it is their obligation to use templates in as confusing a way as possible.

I'm glad I'm not the only person in the field that thinks templates are hurting C++.

I am of the belief that templates are flawed in C++, and often suffer what I call the "Curiously Compounding Template From Hell." You've seen it. It usually involves a couple STL collections, a parameterized string class, and a meta serializer -- all in one type. This monstrosity of course needs to be passed to a templatized "generic" algorithm which results in a 235 line compile error originating in some obscure STL code, because you didn't override the right shift operator. This is the point where I get a cup of coffee and remind myself how productive I will be once I get my code to compile.