Unlike the lightweight, super-abstract, interpreted, often browser-oriented languages that are taking over programmer message boards and job reqs these days, C++ has never one made anything approaching the promise of “write once, run anywhere.” Aside from the obvious trait of producing native binary, and being dependent upon the existence of a platform-specific compiler, there is a complex saga of library incompatibility even when using the same code.
This is because until 1998 there was no true C++ standard, yet there was a “Standard Template Library” (STL) – that wasn’t actually standard. The STL was (and still is) several different versions of the same thing provided by different vendors. What this means, as an example, is that sometimes in a corporate tech firm an intern would get tasked as a summer project with replacing all of the instances of the RogueWave STL with home grown classes to avoid compilation headaches.
This excellent article at Slashdot not only describes the history of this predicament but also focuses on the current round of C++ confusion that we are facing. The C++ 11 standard (officially ratified in 2011) has a tremendous amount of overlap with something that has become the savior of many C++ developers over the years – the Boost Library.
C++ is a fine language and useful for many problem domains. With that said, we can describe one of Boost’s most important features: it turns C++ into something that is no longer C++. Or to be a little fairer, it brings the following features and many more into the language:
- lambda expressions (the essence of functional programming),
- “foreach” loops as in Python, Perl, and Java,
- regular expressions,
- threads (at last, thread-safe C++ code)
Theses are just the basic features that help bridge the gap between many higher-level languages and C++ while still allowing a developer the dynamic range that lets them work on down-to-the metal register optimizations while also implementing some fancy graph theory library.
However, most of these features have been incorporated into C++ 11. This means that teams that built great foundations of code with Boost are now potentially faced with the task of displacing Boost in order to take advantage of some of the other improvements to C++ - perhaps the “intern summer project” of the near future. Vetting out the two will not necessarily be easy and as Jeff Cogswell’s article on Slashdot indicates it may be an issue of choosing one over the other; in other words, continuing to make the term “C++ standard” seem like an oxymoron.