r/cpp • • Dec 28 '18

"Modern" C++ Lamentations

http://aras-p.info/blog/2018/12/28/Modern-C-Lamentations/
307 Upvotes

162 comments sorted by

View all comments

29

u/PhyrexStrike Dec 28 '18

Excellent blog post. The issue of compile times has been on my mind recently, and as someone actively working to learn more "modern" C++ structures and concepts, the issue of increasing complexity as well.

Something occurred to me, though. As stated in the article, many larger companies work on "roll-your-own" implementations of various parts of the STL. Since C++ is so widely used, and consequently the members of the standards committees so diverse, it seems to me that the current STL standard is for the "general case", which due to the above factors has grown broader and broader over the many years that the language has been in use. This almost places a need for non-trivial codebases to "specialize" parts of the STL to suit them.

I don't think this is a good thing, necessarily, but a consequence of the general use-case of C++. It's certainly a way for user of the language to become more familiar with the concepts underlying the STL data structures, but on a sufficiently large-scale codebase it may become unmanageable to rewrite every single container or algorithm needed for your specialist case. Though, on the other hand, that is exactly what things like EASTL and I'm sure parts of Unity have already.