What’s Boost?

With so many languages, libraries, tools, frameworks, and Internet fads to keep up with, sometimes you let a few slip through the cracks.  This post is intended as an ultra quick primer (one of many) for anyone who let the Boost C++ libraries slip through the cracks.  If you have used Boost before, this post is not for you.

Below is an edited version of an email conversation that I just had with one of my coworkers:

Me:

From the Wikipedia article:

The Boost C++ Libraries are a collection of peer-reviewed, open source libraries that extend the functionality of C++. Most of the libraries are licensed under the Boost Software License, designed to allow Boost to be used with both open and closed source projects. Many of Boost’s founders are on the C++ standard committee and several Boost libraries have been accepted for incorporation into the Technical Report 1 of C++0x.[1]

The libraries are aimed at a wide range of C++ users and application domains. They range from general-purpose libraries like the smart_ptr library, to OS abstractions like FileSystem, to libraries primarily aimed at other library developers and advanced C++ users, like the MPL.

In order to ensure efficiency and flexibility, Boost makes extensive use of templates. Boost has been a source of extensive work and research into generic programming and metaprogramming in C++.

The Wikipedia article does a pretty good job of explaining what boost is, but here’s a little more information.  In non technical terms, Boost "contains a bunch of sneaky cool libraries that let you do some pretty sweet things in C++".  The libraries can be a little daunting to look at when you first start, but those that I’ve messed with are pretty useful (and really cool under the hood).  For those that have not messed around with boost but despise C++, part of the reason that I like C++ so much is because ideas and tools from boost as well as those found in the depths of the STL/TR1 (as well as other best practices) have made the language a lot easier and safer to use while also enabling you to do some really powerful things with the language.

Coworker:

Okay, so what’s the difference was between Boost and other Open Source Projects like Apache, which also has a lot of nice C++ libraries and has a license that allows you to both use the code in open and closed source projects?

Is there a different Metaphor here than simply:  "It’s an open source foundation for C++"?

Me:

That’s essentially the metaphor, but I would change it to read:

"It’s THE open source foundation for C++"

Boost has implemented a lot of libraries that have gotten rolled back into the STL, so in a lot of ways, it’s like getting a new version of the C++ STL before it gets released except that you actually get a lot more libraries than will ever make it into the real STL.  You also get a lot of things that really should have been in the STL, but were omitted for one reason or another (hash tables, for example).  With the benefit of getting things that don’t have to go through all the red tape of the standards committee, you also have the downside of having libraries that are not universally a part of a standard C++ implementation of the STL which may or may not be a concern for you depending on your project’s requirements.

Anyway, boost is awesome if you’re a C++ dev (and you should already know about it if you are one).  My only gripe has been that I have found their documentation to be a bit painful at times which can be a hassle since their libraries can be tricky to use the first time unless you have some good example code.

This entry was posted in C#. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*
*