I think you mix a lot of different problems, not all of them are related to Boost:
First, should programmers (or C ++ novices) be encouraged to use libraries, idioms, paradigms, languages, or language functions that they donât understand?
- No, of course not. Every programmer should understand the tools that they use, especially in C ++. However, I do not see many questions here about where people are encouraged not to understand the code that they use. When people say they want to make X in C ++, I think he says that âBoost has an implementation of X that works, which is more than a homebrew solution, and use that.â
Of course, if the question is âhow does X work,â the question cannot be answered âuse Boost implementationâ. But I really don't see the problem in the Boost recommendation for the old questions.
I also do not see how you can use Boost without understanding what is happening under the hood. C ++, with or without Boost, is not Java. Using Boost in no way protects you from the complexities of the language. You still have to worry about copy constructors, pointer arithmetic, templates, and everything else that could explode in your face.
This is not like what happened in Java. They developed a language that removed all the subtleties. Boost does not. On the contrary, he developed new idioms and methods in general programming. Using Boost is not always easy.
On the availability of Boost, I think this is not a problem. It is available on the platforms used in the vast majority of issues, and if they cannot use Boost, the offer is still not harmful, just useless.
In addition, most Boost libraries are header-only and do not require installation of everything. If you only want smart pointers, just include those headers and nothing else.
About FOSS, you have a point in some cases. But I would say that this is a problem for less universal libraries that users do not have. But Boost is extremely common, and if people donât have it, they should get it, because it applies to almost all problem domains. And, of course, the license is compatible with any FOSS project that you would like to mention. I would rather work on an OSS project that used Boost for heavy lifting than one that invented its own (buggy and proprietary) wheels with steep learning curves that could have been avoided.
So yes, in some cases the Boost recommendation is useless. But I do not see how it can be harmful.
In any case, I donât see how it can be even half as harmful as teaching beginners to roll on their own. In C ++, this is a recipe for disaster. This is the only reason C ++ still has a reputation for error prone and buggy software. Because for too long people write everything from scratch themselves, not trusting the standard library, not trusting third-party code, not trusting everything that was not legal in C.