Hacker News new | ask | show | jobs
by planede 1176 days ago
Boost is multiple libraries, you don't have to use all of it. Many of it are header-only as well.
2 comments

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.

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?)

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.
This is in general is a problem with C++ libraries because doc generation is not standardized unlike Rust and other languages.
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.

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.
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
I don’t know. I’m just telling my experience. Whatever release I thought I needed at the time was huge.