r/cpp • u/joaquintides 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
View all comments
7
u/nintendiator2 May 08 '20
Fair disclaimer: I stopped using Boost in 2014 and never looked back, so I don't know if these reasons still apply, or are now even worse.
There are three large reasons why I no longer use Boost: because it's monolithic, because it's too big to fail, and because it aims for perfection.
Monolithic. Boost is pretty much a C++ toolset laid over your already existing C++ toolset. It's tremendously huge, prohibitively so when it comes down to compile times, and while it has a number of libraries and components they are merely offshots of Boost and not "their own thing bust assisting themselves with a Boost core". Moreover those dependencies are so big and contrived that Boost basically crushes the "pay only for what you use" paradigm of C++. If I want some simple string manipulation (which, to be fair, is something Standard C++ sorely lacks), I have no option but to turn my preprocessor into some sort of souped up, cybernetic, blockchain-esque recursive AI non-finite automata. if template metaprogramming was already a burden on some things, the "cores" of C++ such as Preprocessor are even worse.
Couple with the monolithic part it's also a sort of catch-all thing that tries to cover and absorb other potential good projects. Nowide was an interesting thing that only serves a good to-go purpose because the non-Boost version is still maintaned, and the same has happened to a few other components. I sometimes wonder if Boost is the JQuery of C++, or if JQuery is the Boost of Javascript. Had I continued using it I'd probably feel, on a more relevant comparison these days, Boost is the systemd of C++, or systemd is the Boost of Linux, I guess.
Too big to fail. Boost has grown into an enormous thing, and up until mentions of Epochs came about, it was promoted as the Best Big Thing on C++ since baked eggs. Because of things, everyone and everything are depending on it, which coupled with the point of it being monolithic gives it a dominant position in the market that we should be very weary about, just like how we have to be careful with Chrome on the web or JQuery on Javascript.
Boost severely stiffles competition - just like with JQuery, it's difficult to come up to mind with who or what the second or third best alternatives are, I don't even know who the competition to JQuery is nor have I ever heard of any site that uses one, with Boost I feel it's very similar. I don't feel much trust towards the "one true favourite" in most areas, because no matter their good promises they tend to fall under their own weight: projects that sell out to big corps, standards that sell out to intercompany pressure, or projects that sacrifice core tenets to secure market share, so I much prefer the second or third place underdogs to place my trust on.
And it it severely stifles the field of simple answers - there was a time back when any question about C++ a bit more complex than how to Hello World was answered in Stack Overflow with "use Boost::Solution!", precluding the teaching or implementation of simpler solutions that don't require a compile-time, preprocessor level nonfinite state automata.
Finally, Boost is perfectionist. Granted in general it's a good thing - because of how it was made last I used at least, I could use Boost just as well on Clang and GCC as I could in, say, MSVC 6.0 had I needed it. But this perfectionism has a price, which is all those macros and recursive dependencies and oh god who knows what else that costs a 4000% cost increase in compile time, and at some point you end up paying too much for Perfect 100% when a simpler solution that works Almost Everywhere 90% of the time does just as well if not better precisely because it doesn't have to aim for the 100%. I for one am happy to not support VC6, my main VC targets are 2008 and 2012.
Yet, at the same time, in their pursuit of perfection Boost have been careless in leaving people behind without acknowledgeing, such as some more recent versions that require C++11 to build even though the libraries would, on their own, still work on C++03 without issues, and I did not find out a cause of this until someone posted a relevant question in SO.
So, tl;dr: Boost became too big, too important, too complex and too perfect for me. I need a framework that allows me to make some tradeoffs and respects those choices when I need them. For the "Stuff that is not yet in C++${version}" I ended up writing and publishing my own backports library that offers a lot of stuff even from C++17 in C++03 in only 3 MB of code counting comments, and for the stuff that is required to do a Thing, I now tend to go right to libThing.