Jump to content
  • Advertisement
Sign in to follow this  
KodeNerd

Boost Libraries

This topic is 3895 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
It's not so much a question of "Is boost worth using in C++?" so much as it is a question of "Is C++ worth using without boost?", in my opinion, to which my answer is "No, it is not."

So yes, it's definitely worth learning boost if you're going to use C++. Not all at once or anything, but one of the nice things is it's a collection of separate libraries which are easy to learn and apply individually. You could start with just the smart pointer library, for example. And when you want to do something and think, "Hey, doesn't Boost have something for this?", then you can get ahold of another part of the library.

Heck, there's still a few libraries in the boost collection that even I haven't learned. But it's nice to know they're there should I have a need for them in the future.

Share this post


Link to post
Share on other sites
I'm with MaulingMonkey 100%. I've gotten to the point where I'm not sure how I would code C++ without boost::shared_ptr, or at least how I'd use RAII and exceptions.

Share this post


Link to post
Share on other sites
Just to reinforce what's already been said...

If you're going to bother with C++, you might as well use (at least some of the libraries from) Boost.

If you don't use Boost, you're either going to:

a) write brittle, unsafe, and/or unidiomatic code, or
b) end up implementing functionality already offered by Boost yourself.

Furthermore, it pretty much goes without saying that it'll take you less time to learn to use the libraries in question than it will to write and debug the equivalent code yourself (most of the libraries are really quite easy to use).

Disclaimer: there may be cases where it really is preferable (or perhaps even necessary) to roll your own solution rather than using a specific Boost library, but these cases will be the exception and not the rule.

Share this post


Link to post
Share on other sites
Quote:
is it really worth the time of learning


Unlike MSCP, which costs $X and grants you a Y% raise, boost doesn't come with certification (or perhaps it even does). So the usual financial benefit isn't there.

What to learn then? Stuff that gives you immediate, tangible benefit? Certifications are fine, but they only go so far (in honesty, they go really far).

So at pragmatic level, it comes down to this: What is your involvement in software development? A career? Hobby as a student? It-pays-the-bills(tm)? Passion? Way to get rich?

There are many situations where learning a lot of domain-specific subjects may be counter-productive to your ultimate goal. A naive stereotypical example: if you're aiming to elbow yourself into management, then time spent on office politics, management courses and MBA degree will be much better spent.

But there's something that's missing from your question, namely your past C++ experience. Anyone who's worked with C++ seriously (dead-lines, real-world environments, etc.) and has looked at boost said: "Now this is something that solves my problems". There's another category of people who looked at boost and mumbled "template-based intellectual masturbation". This second group has semi-warranted reasons for their claims and mustn't be discarded by default.

And then sometimes, ignorance is bliss. Getting stuck on a VC 6 project, dealing with MFC legacy, it's better to not know the alternatives. It makes it easier to feel good about that code.

"Worth" is very relative. So rather than relying on opinion of people who have absolutely no idea about Boost's worth to you, take a look at it. Three things will happen:
- Wow, just what I always needed
- Ouch, way over my head
- Bleh, too messy, I'm not touching that

Always use the tools that you find helpful. Learn to evaluate them yourself. Following the hype, even in case of boost, is likely to leave you disappointed.

Share this post


Link to post
Share on other sites
Quote:
Original post by Antheus
"Worth" is very relative. So rather than relying on opinion of people who have absolutely no idea about Boost's worth to you, take a look at it. Three things will happen:
- Wow, just what I always needed
- Ouch, way over my head
- Bleh, too messy, I'm not touching that

Some really good points. But just to reinforce what was said before, one of the nice things about Boost is that it's a collection of separate (and each one usually relatively small and easy to use) libraries. So when you take a look at Boost, remember that you don't have to understand or use *all* of it.
Some parts of Boost are extremely straightforward to use, and saves you a lot of bother, while others require you to *really* know the ins and outs of C++, and be willing to spend quite a bit of time with the documentation.
So yes, as Antheus said, take a look at Boost, and find out if it's worth using in *your* case. But don't look at Boost as a whole, because that's just scary, pick out the individual libraries you're interested in.

(In general, if you're not tied up with an ancient VC6 codebase, and if you care about programming, MaulingMonkey's answer probably applies. Boost is more or less the standard library C++ should have had)

Share this post


Link to post
Share on other sites
What boost class(es) should i learn? from what i hear i should learn the share_ptr and related (auto_ptr? weak? i dont know what else).

and i also heard nothing else about boost :|. just that the share ptrs are good...

Share this post


Link to post
Share on other sites
Go to the boost website. Go over the list of libraries in the documentation section. For each library: if it sounds like something you can use in your current project, read more about it. If it still sounds useful, learn it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!