Re:MutexProtected: A C++ Pattern for Easier Concurrency
by planede on Thursday April 06, 2023 @07:12AM
(#35466791)
Boost is multiple libraries, you don't have to use all of it. Many of it are header-only as well.
[ Parent
| on HN ]
Re:MutexProtected: A C++ Pattern for Easier Concurrency
by FpUser on Thursday April 06, 2023 @07:25AM
(#35466897)
Seriously I have no desire installing this giant thing and deciphering what can be extracted and how.
This is not to diminish value of Boost but it is just simply not for me.
Re:MutexProtected: A C++ Pattern for Easier Concurrency
by misnome on Thursday April 06, 2023 @07:35AM
(#35466988)
not to mention that the documentation is generally utterly awful, with mostly only reference-style function documentation without exposition but manually distributed across lots of small 1-page paragraphs.
Re:MutexProtected: A C++ Pattern for Easier Concurrency
by lenkite on Thursday April 06, 2023 @12:55PM
(#35471139)
This is in general is a problem with C++ libraries because doc generation is not standardized unlike Rust and other languages.
Re:MutexProtected: A C++ Pattern for Easier Concurrency
by misnome on Thursday April 06, 2023 @07:36PM
(#35476021)
Doxygen was a great step forwards when it came out, but C++ documentation doesn’t seem to have evolved since, and it only fulfills the “reference” pillar of documentation.
Rust’s books (mdbook?) are amazing. Lots of libraries have good, clear documentation explaining how to use the library, on top of the automatic docs.rs output (which I still sometimes find difficult to navigate, but think is just my incomplete understanding). I have no idea how the community has managed to consistently achieve this.
Re:MutexProtected: A C++ Pattern for Easier Concurrency
by electroly on Thursday April 06, 2023 @10:05AM
(#35468465)
Using only the header-only stuff is super easy; there's no deciphering or extracting at all. You just include the headers and _don't_ link the Boost library and see if it builds. If it doesn't, then I guess that wasn't a header-only library. You're not building or installing Boost at all; you're just downloading a copy of the headers. Only the template instantiations you actually use will end up in your binary.
(This sounds flippant but it's literally how I use boost in real life. Why decipher when the compiler can just tell you?)
Re:MutexProtected: A C++ Pattern for Easier Concurrency
by dkersten on Thursday April 06, 2023 @09:31AM
(#35468085)
I once tried to use a library that used boost and since I didn’t want to require my code to need the entirety of boost (which is gigabytes in size!) I tried to extract just the parts of boost that were needed. There are so many interdependencies between sublibraries of boost that after about two hours I decided I will never again use any library that relied on boost.
Re:MutexProtected: A C++ Pattern for Easier Concurrency
by jcelerier on Thursday April 06, 2023 @09:40AM
(#35468169)
Boost isn't gigabytes in size wat are you talking about. All the headers are here in this 14mb archive: https://github.com/ossia/sdk/releases/download/sdk25/boost_1... and that is enough to use 90% of the boost libs as they are mostly header only