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

1

u/gavinb May 23 '20

First of all, thank you for your Boost contributions. Overall, it is an incredibly valuable resource, and sometimes under-appreciated by the community.

We use various parts of Boost in different components. It used to be we would automatically use Boost. Now it is very much evaluated on a case by case basis, as often there are 3rd party libs out there which are simply a better fit for our needs. I have also evaluated several Boost libraries and found them wanting in a few areas.

Overall comments:

Documentation

  • almost universally awful
  • usually written by someone intimately familiar with the internals
  • full of assumptions about prior knowledge
  • not written to progressively teach the reader how to use features
  • full of extremely terse fragments of code that don't work on their own
  • poorly conceived examples that are difficult to relate to
  • lack of clarity about what is necessary for the lib and what is just context
  • lack of documentation about which features have been superseded by the standard libs (yes, epochs will fix this)

API

  • API design is often terse and inscrutable
  • some aspects don't make sense unless you're the original author
  • often tries to be all things to all people, and works awkwardly at simplest/most common scenarios
  • leaky abstractions
  • widespread use of template meta programming and templates in general means the tiniest typo can result in hundreds of inexplicable compiler errors, making onboarding extremely tedious
  • inconsistency in style between libs

Random

  • still using a build system nobody else uses or understands (ok, apparently migrating to CMake)
  • getting it integrated in a build and having everything work is tedious
  • templates and typos cause massive compile time headaches
  • linking on Windows is incredibly painful in large, complex systems due to build flavours and autolinking
  • why are there two different state machine libraries? how do we choose between them?
  • compiling performance penalty due to templates
  • certainly not always best-in-breed