4 ms·
Choosing to use a library should still be a carefully weighed decision. You often must commit to the library's data structures, or write a bunch of boilerplate
by blt 13y ago
Choosing to use a library should still be a carefully weighed decision. You often must commit to the library's data structures, or write a bunch of boilerplate wrapper code to insulate them from the rest of the system. I imagine this is less of a problem in languages with dynamic typing or golang-style interfaces.
If you're using only one or two functions from a big library, it might not be worth the overhead. A lot of Boost libraries are super complicated and really turn me off when I want something simple like a directory scan or a synchronous socket. Sadly there is often no alternative because the C++ community has thrown so much weight behind Boost.
I wish C++ had a module/package system and a simple version of Boost that only covers the most common 90% of functionality. But that leads to another problem with libraries: when you suddenly hit the limits and need to completely ditch them for something more powerful.
I like libraries but it's not always an easy choice to use one.