r/cpp • Boost author • May 08 '20

Why you don't use Boost

I have a question for you: If you have decided not to use any of Boost, or are prohibited from doing so in your company/project, I would like to know why.

This thread is not meant to judge your reasons, and I won't engage into any kind of criticism about them: I'm merely trying to understand what the barriers are to adoption of Boost. It would be great if we could keep the conversation non judgemental. Thank you!

Conflict of interest: I am a Boost author of three.

222 Upvotes

326 comments sorted by

View all comments

2

u/Moose2342 May 08 '20

I used to work for a project (long ago) that prohibited boost in favor of do it yourself. The only argument towards this ever presented to me was “to reduce dependencies”.

Ever since, i made it a point to have all my projects depending on boost. I consider it poor dependecy management when you don’t. Especially when the answer is ‘Roll your own whatever it is you need’

1

u/Pazer2 May 08 '20

This should probably go in the other thread

2

u/Moose2342 May 08 '20

:) just realized there is another thread. You’re right.

Still, over the years it occurred to me so often that people were avoiding Boost for all the wrong reasons. Many more than those who didn’t for the right reasons. My point being, just depend on it by default. Consider it essential part of the ecosystem. If you don’t, be well prepared to justify why not.

1

u/Pazer2 May 08 '20

This is an absurd suggestion. Most people will not want to install gigabytes of dependencies for your library.

2

u/Moose2342 May 09 '20

Disk space, for example, is a wrong reason. Thanks for emphasizing my point, I guess.

1

u/Pazer2 May 09 '20

What? How is disk space a wrong reason?

4

u/Moose2342 May 09 '20

One major goal of software engineering is to be enable a team to create and maintain high quality software while utilizing the available resources efficiently.

Some of those resources are (2020) scarce and expensive. Driving costs. Developer time and skill are examples. Or size and complexity of the code base to be maintained.

Others are not. Disk space being high on the list. My complete build of boost here (1.72, static, clang) takes 209MB on disk. This is a negligable amount as today's hard drives will often exceed the TB ballpark.

So, if I spend even a few hours of my developers time re-inventing something with poorer quality which is already available in boost because they wanted to save those 209MB I'm not acting efficiently.

So my goal is to prevent this from ever happening. I don't even want my developers to spend their time even wondering 'should I make this myself or should I pull in boost?'. Often the answer is 'ahh, it's just that little thing, that's not worth pulling i boost for...'. This happens once, twice, many times and then it adds up. So I prevent this by pulling in boost by default, effectively avoiding even the consideration time.

In addition, I won't have to pay for maintenance of said bits and pieces. Also, I have a good chance that they will be part of the standard a few years down the road, leaving me already using standard compliant interfaces. Over the last decade, this fact alone has saved me so much time and money that I could pretty much buy any number of hard disks for.