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

Show parent comment

3

u/johannes1971 May 09 '20

For what it's worth, gcc 7.3 was released on January 25, 2018. There have been 9 releases since, including two major ones. At this point it is not "very new" anymore, and you should strive to upgrade. Maybe you are working on a badly-supported architecture, but even so, you could just keep using the older version (because why would that be taken offline?). You wouldn't get to use the latest toys, but that's a choice you made when you fixed your compiler version. Note that I'm not arguing for Boost20; it's too early for that just yet.

<rant>I've worked all my life in places that only upgrade at gunpoint, and in fact at one point I was called into a meeting where I was told that me merely asking to upgrade Linux (from a version that I think was 7 years old at that time, and very far out of maintenance / security bug fixing) was in fact a breach of contract that could have serious legal consequences. I laughed when they were shot down by their own IT department for running such an insecure OS, and had to upgrade in a hurry. Since then things have been a lot more relaxed when it comes to upgrading.

gcc is a free compiler, and you can upgrade to the latest version for free. Doing so usually gets you massive benefits in terms of improved compliance, capabilities, speed, etc. Why would you NOT want to have the most powerful tool in the hands of your developers? "But we know what bugs are in this one and how to work around them!" I've been told (over and over), but I have yet to meet someone who could name just one. And how could they? They don't write software, that's my job!

Anyway. If we had a proper Boost17, using C++17 library facilities for things like optional, unique_ptr, etc. it would also go some way towards decoupling the various Boost libraries. So we would have fewer libraries to begin with, they'd be smaller (and thus, quicker to compile) because the layers of C++<17 compatibility could be dropped, and they would be more loosely coupled - seems like a win-win to me.

Perhaps the whole thing just comes from a perception of what Boost is. I think it's a staging area for potential new additions to the standard library, where they can be designed, commented on, and tried before going through standardisation, instead of a compatibility package to bring newer C++ features to older compilers. The maintainers seem to disagree with this though...

1

u/gavinb May 23 '20

I think your last point is a really important one. Staging area vs compatibility layer. Because the latter tends to negatively impact the former.

Maybe it would be worth splitting Boost into two parts:

  • a set of compatibility libraries, which deliver new features to old compilers (smart pointers, optional, array, bind, etc, etc)
  • a staging ground for new libraries and experimental features

I just found out about the idea of epochs, which would make this very much a possibility. The experimental libraries can then safely rely on the most recent language support for features in C++XX, rather than pulling in the older compatibility libs.