What is Boost Anyway?

As a C++ programmer the most important thing to know about the boost libraries is this: They will continually save you time and improve the quality of the programs that you write. It is hard to overstate the value that the boost libraries provide to a programmer, all at an attractive price point... nothing! Boost is both awesome and free, a combination that is very hard to beat. If you're a C++ programmer and you aren't familiar with them yet do yourself a favour and get familiar right NOW!

The Boost Libraries

The boost libraries are a set of peer-reviewed C++ source libraries performing a wide range of functions. Just to give you an idea here are a few examples; a cross-platform filesystem interaction library, portable multithreading, extended math functions, regular expressions, a command line option parser and the list goes on and on. There are currently over 80 individual libraries in the boost set, all with a specific and useful purpose. If you find yourself in a situation where a feature “feels” like it should have been implemented already, chances are it has; in boost. Boost should be your first port of call when looking for existing code to solve any given problem, remember not to reinvent the wheel.

The Significance of Boost

Boost came about because a number of members of the C++ Standards Committee proposed that having a central repository of useful C++ libraries would be good for the language and good for the community. To this end they founded boost and it has been a great success. In addition to it's original purpose the boost libraries are a de facto testing ground for features that will one day make it into the language proper. For example most of Technical Report 1 (TR1) will feature in the upcoming C++0x language standard and most of that was taken directly from boost libraries. So not only is boost useful, it is also (to a certain extent) future proof, as features in boost may one day be standardised in the language itself! In other words boost isn't going away it is only going to get stronger.

Weaknesses

I would have to say that the only weakness of the boost libraries is the somewhat terse and non standardised documentation that comes with each. Documentation for some libraries is good while others are hard to follow. Each library has documentation written by different authors, and the same structure is rarely used. A common theme with all is the level of technicality, obviously necessary to some degree but it can be intimidating to the uninitiated. With that being said, the documentation isn't terrible and perseverence will get you the knowledge you need.

Why you should care

As a programmer I expect that you have some passion for using the very best tools when you do your work. Most people focus on having the best IDE, fastest development machine and many other tricks to ensure that they are at their most productive. I'm here to tell you that boost fills that optimisation role in library form and the benefits you gain from using it will far outpace those gained from workflow micro management.

Great tools; like an IDE or fast machine can yield a small percentage increase in your productivity or perhaps even double it if your extremely lucky. However there is no substitute for finding a library that shaves hundreds of hours off your development time, time that would have been spent hand rolling a solution.

…boost will introduce you to industry best practice, helping to improve the quality of the code that you write.

Not only this, boost will introduce you to industry best practice, helping to improve the quality of the code that you write. Resource Acquisition Is Initialisation (RAII) is a well known and accepted idiom for dealing with memory allocations and management of other resources. Industry best practice techniques like this will save you countless hours of headaches if understood and used systematically. Using boost will introduce you to these concepts in a practical way, helping you to learn them thoroughly and with justification.

Fundamentally boost is a set of libraries that is developed by the best in the business. Then peer reviewed by many sets of eyes to make sure that the code is mature and solid. Existing libraries are updated and refined on an ongoing basis and new ones are added periodically. Boost is an evolving, iterating code base that increases in quality as time passes and that will be maintained into the future as it merges into the core language.

As is obvious from the tone of this article I can't recommend the boost libraries strongly enough and I will leave you with one final statement: get on board, you won't regret it.

How to get Boost

The best place to get boost is from (surprise, surprise) the official website boost.org. For your convenience though here are links to the download/installation instructions for both windows and linux.

Leave a Comment