What is boost for?
What is boost for?
Uh, for programming in C++? :)
You could look at the website:
Here's a sort of About page: http://www.boost.org/users/Quote:
Boost provides free peer-reviewed portable C++ source libraries.
We emphasize libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications.
Boost is a collection of libraries from different areas. I think they can be divided into five big groups:
1) Meta-libraries: these libraries concern meta-programming, especially the writing of other libraries. As an application programmer, you'll rarely need them. These are e.g. the MPL, the Preprocessor library, Parameter, and Proto.
2) Basic utilities: small, very widely applicable utilities. Extremely useful. Examples are the smart pointers, tuple, optional, and string_algo.
3) System integration libraries: provide cross-platform access to system services. Very useful when you need this service. Examples are Filesystem, Asio, Threads, and Interprocess.
4) General-purpose libraries: bigger than the small utilities, they have a steeper learning curve. Still, they can be applied to many problems. Examples are the pointer containers, the iterator library, Date/Time, and Exception.
5) Special-purpose libraries: these are not so widely applicable, but in their domain they make things a lot easier. Often very big and complicated. Examples are Graph, Spirit, GIL, and Units.
Ok so in other words it is something that someone should probably not learn unless they want to teach C++, right?
No, it's a bunch of useful libraries.
A lot of the additions in C++-0x comes from Boost, too.
Think of it as "extended C++ standard library". It's like a testbed for proposed additions to standard C++.
Or for someone that wants to program in C++. They have a lot of useful functions so why not use them? For example, you ask a question here and somebody tells you you can use boost:thisFunction. You search it and you learn it. You might want to use boost threads, so you read them and use them. No need to learn everything, just whatever you need.
Generally, they are very good and reliable libraries so learning them will sure be useful. You cannot do everything with only the standard libraries
How much Boost stuff will be added into the STL?
Boost stuff won't be added into the STL (standard template library) as far as I am aware; rather, I think it will go into a new namespace called tr1. http://en.wikipedia.org/wiki/Technical_Report_1
Also see http://www.boost.org/doc/libs/1_34_0...boost_tr1.html
Dunno if they are directly from boost, but tuples will be added. Threads as well. I believe also smart pointers, or am I wrong?
My wife made me go to tuples counseling once. I did not like it. I do not fully understand what a smart pointer is for. Will they completely remove the ability to use normal pointers in C++!?
No, they won't. Don't really know what they are either.
Tuples are simple. Think of them as a pair of values. Other languages let you use them directly with (val1, val2) syntax.
If you do this tuple1 = tuple2 then you have tuple.val1 = tuple.val1, tuple.val2 = tuple.val2
Think of when you want to return 2 values. You return a tuple and do your job simple
I don't see how that is a hugely beneficial addition to the language, but I am sure someone will argue that it is. It opens the door to "We need to have a function that returns 16 values!"
With C++0x, most of these are upgraded to full standard library status (sometimes with modifications) and moved from the std::tr1 to the std namespace.
Interesting. I wonder if any of the members here are part of the standards committee. Then we could know which things will make the cut before the rest of the world :)