25

I am curious to learn Boost. But I wanted to ask:

  • How important is it to make the effort to learn Boost?
  • What prerequisites should one have before jumping on Boost?

Why I am curious to know about Boost is that many people are talking about Boost on IRC's channels and here in StackOverflow.

einpoklum
  • 118,144
  • 57
  • 340
  • 684
Priyanka Mishra
  • 10,400
  • 18
  • 62
  • 75

10 Answers10

40

I think anyone that is seriously considering C++ development as a career should learn Boost, and learn it well. Once you get into serious programming you will realize how beneficial these libraries can be and how much more productive they can make you. Not only are they cross-platform, but once you get into data crunching with large numbers, the math libraries especially will seem like a gift from above.

John T
  • 23,735
  • 11
  • 56
  • 82
  • 9
    Boost (begins to) lifts C++ from it's roots in C (pretty assembler) and helps it reach usability that other languages have enjoyed for quite a while (Java/Python/Ruby/Lisp/etc.). – Trey Jackson Dec 11 '08 at 18:09
14

As a game developer, I've been shocked by how many people don't know about Boost. I've mentioned it to contacts in various game studios and not only is it frequently not used (is licensing or porting it a problem?) but many people haven't even heard of it. This leads me to believe that from a career perspective, it's not actually critical to learn Boost, but from a personal development standpoint, it is definitely vital. :)

Parappa
  • 7,566
  • 3
  • 34
  • 38
  • True Boost seems to be regarded as some mythical beast among many professional game programmers. Too bad more people don't use it. – Robert Gould Dec 11 '08 at 08:28
  • At the game company I worked at, it was indeed a licensing problem. While nothing in the boost license prevented us from developing games with it, we weren't insured against potential future litigation regarding its use. So we were effectively paid to repeatedly reinvent the wheel, poorly. – Drew Dormann Dec 11 '08 at 15:27
  • I asked a game programmer friend of mine if he used boost about a year ago, to which he replied: "boost? that's mostly on the user interface side of things, never used it." :P – radman Jun 03 '10 at 05:25
  • boost doesn't have any ui libs? does it? – Roman A. Taycher May 11 '11 at 06:37
8

Discussed previously: what are the advantages of using the c++ boost libraries.

Community
  • 1
  • 1
gimel
  • 83,368
  • 10
  • 76
  • 104
6

As for any pre-requisites, you should be familiar with the STL and some experience of templates wouldn't hurt. I'm always amazed at how many C++ programmers don't actually use either the STL or templates.

Rob
  • 76,700
  • 56
  • 158
  • 197
4

A language is a tool. Use it if it helps you accomplish something.

I am so sick of these religions. "Should I use Boost? If I don't use Boost, does that mean I'm not a real C++ programmer? Will other C++ programmers like me?" Please. Any C++ programmer who cares if you use Boost or any other library is a close-minded jerk, and you should have nothing to do with him.

Rather, go find an intelligent, open-minded person who can tell you how Boost and who-knows-what-other library has helped him in his own work. He'll even admit that sometimes you don't need those libraries.

Alternate answer: re-implementing part of Boost or STL yourself is a good way to keep your programming abilities sharp. In other words, a C++ programmer who can't fall back to C because he's without his libraries is a weak programmer.

Matthew
  • 49
  • 1
  • Very good answer! Moreover, I think you will miss a big part of C++ if you keep using libraries to do the painful stuff, like serialization, networking, etc. Finally, when you apply to job posting, they will ask you questions that are often equivalent of what those library does, sorting would be a good example. How could you answer those questions if you always have used libraries for everything! ;) – ForceMagic Dec 21 '12 at 01:42
  • 1
    I would prefer my programmers to know and use libraries vigorously instead of reinventing the wheel (typically a worse wheel). Knowing when to use a given library and how can be somewhat of an art in itself. I do agree that it is important to remember the basics, too (basic being lower level stuff, not easier). – Marc Claesen May 24 '13 at 17:41
4

It's very important, especially as many libraries from Boost are getting into the C++ standard -- by using Boost, you get an early look at how the standard will look like (shared_ptr, anyone?).

Moreover, even if you don't use them, the Boost libraries are very well written and often interesting to look at; they do some really advanced C++.

Anteru
  • 19,042
  • 12
  • 77
  • 121
4

I feel that boost is such a productivity enhancer that I don't think I would accept a job with a C++ shop not using boost.

oz10
  • 153,307
  • 27
  • 93
  • 128
2

Boost has rich set of libraries that you get it for free.Get to know what are all the libraries available in boost so that you can use one if there is a need.About learning ,select libraries that are included in c++0X so that you can use it and soon compilers are going to support.About particular library learn it when ever you need.

yesraaj
  • 46,370
  • 69
  • 194
  • 251
1

Judging (scientifically :-) by the huge quantity of questions on SO about C++ which have top-rated answers along the lines of "Use Boost::SomethingOrOther", I would say it's very important.

The thing that drew me from C to Java instead of C++, was the huge quantity of supplied classes in Java. Boost almost manages to convince me to go back, except for the fact that I'm now heavily mired in web services where Java is the lingua franca.

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
1

Please remember boost is just a set of libraries which can be used to improve productivity (stop reinventing the wheel).

They are, by all accounts, well written and use techniques that you might not (i.e. defintely won't) think up by yourself. If your intention is to look through the source to learn advanced c++ techniques then knock yourself out but I think I'd buy a good book instead.

On the other hand, if you just want to use some library functions to improve your productivity consider your options. What are you developing and so what sort of libraries do you need?

Our company has cross platform products that use boost extensively but we also have windows only products that use some boost but, for the most part, rely on microsoft's libraries. MS libraries are good quality and have (imo) excellent documentation (part of MS success lies in making windows as easy to program as possible for third party developers). I mention MS specifically as they offer a broad range of libraries for many purposes like boost. We also use numerous other more focused 3rd party libraries (i.e. libraries that provide functionality in one area such as cryptography).

Patrick
  • 8,175
  • 7
  • 56
  • 72