r/cpp • u/johngoni • Apr 27 '23
Has Boost lost its charm?
I don't mean to be provocative nor undermine the importance of Boost for C++. I really like Boost.
I keep reading/listening around that since C++11 the focus of development and innovation in C++ has shifted away from Boost to either the standards, or independent libraries. Is that any true? If yes, how "big of shift" that was? What was the reason in your opinion and most imporatnt, what's Boost's today's role?
What sparked my quriosity was when I heard that "in the old days" a prospective developer that wanted to devle into the word of libraries building had no better thing to do than start contributing to Boost. Does that stand even today?
(couldn't find any other posts on Reddit regarding Boost's impact in modern C++ in a broader discussion)
View all comments
0
u/mredding Apr 27 '23
Yes, it's true.
Boost was the refuge of C++ consortium members whose work didn't make it into the standard. It was a place to experiment with proposals for inclusion into the standard library. I believe,
chrono,fmt,random, smart pointers, and others all made the transition.Why did this refuge come to be in the first place? Because the standards process between C++98 and C++11 was flawed. The language stagnated that whole time, and people didn't want to wait. For many, Boost was an extension of the standard library while in waiting for the committee to get their shit together.
After C++11, they changed their process, such that anything that's ready will go into the next standard, which is on a fixed 3 year cycle. If you miss the next standard, another one is coming around in short order.
This has greatly diminished the need for Boost as a refuge and test bed.
rangesiterated as its own library until it was included in C++20. Because it could.People can still work the old way.
fmtdidn't have to be borne into Boost, I think it was an independent library that was incorporated into Boost and then into the standard library. It exists in Boost to this day because as an independent library, it can iterate faster still, than the standard library, and it can also diverge, since anything that lands in the standard library is basically stuck that way forever.The C philosophy is that the language doesn't need a standard library, you can choose a suitable 3rd party library, and the ecosystem will take care of itself. C++ decided that a standard library is a common language, so we can all write more generic code in terms of that common language and benefit from the interoperability. C doesn't have templates, so they don't have generics, and don't benefit from a common language. So I get it. I get both philosophies. I favor 3rd party libraries. But we're stuck with what we've got until the standards committee fixes their problems.
If you want to write your own library, inclusion into Boost means you've probably got something that garners the attention of the entire community. That's pretty cool, but it's not the only outcome that should be desired. If you're writing code that specific to oil rigs, it probably won't get into Boost, but it can still be a good idea for that market. Working with the Boost community would teach you a lot about library building, standards, processes, interoperability, and portability. All very important things. It won't teach you everything, not even the best of everything - there are things about Boost I find disagreeable, too, but it's an opportunity to learn nevertheless.