Wednesday, November 28, 2007

When Boost Came into Picture

It is not long after I use STL before I realize it has lots of potential that is not fully realized. It has useful construct like for_each but it's use is hampered by the fact that we need to make a Functor for each function that we would to "inject" to containers, no fun. There's also auto_ptr that has a promising future in helping use deal with nasty memory problems, but alas it's very raw to be useful.

Then comes boost. I find this library pick up some of what STL and standard C++ left off. It helps extend some hard-to-use construct into something that can be used in daily coding with more ease, thus making it's adoption more rapid. It enable us to use for_each the way most of us had in mind i.e: just "plug" a unnamed (lambda) function to it. It adds higher level abstractions and myriad of tools that help tame the complexity working in C++.

What I feel is another interesting feature of it is that it does things in a way that is very align with STL and Standard C++. It feels like an extension of the language rather than a library. It also has a little portion of something that looks like Foundation Library that we typically find in language like Java or C# i.e: Filesystem handling, Thread, Time.

C++ with it's feature like template promise something that STL help realize to some extent. Boost then pick up what STL left off into something more practical, useful and accessible.

No comments: