Hacker News new | ask | show | jobs
by ahartmetz 2209 days ago
But it has a Boost package, which means someone thought it was reasonable!

I'm intentionally using a weak argument here...

1 comments

Reasonable and "C++ library" in the same line is almost an oxymoron.

We like to complain about Java but the C++ guys went all in and apparently can't seem to write a simple array without inheriting from at least 3 primitives and using a couple of templates.

Yes please tell me how you follow the "SOLID" principles when this is as frail as a house of cards

Qt is very reasonable and the standard library also isn't too bad. Boost (some of its sub-projects) is by far the worst in making simple things complicated.
I didn't expect anyone to compliment Qt containers. Most of them are straight up not recommended for any situation because they waste memory, have unnecessary indirections that cause dcache misses, and aren't optimal for multithreading due to COW (and accidental COW due to bad APIs).
This was about ease of use and simplicity of implementation. By the way, QHash's performance will be fixed thoroughly in Qt6. It is significantly faster than std::unordered_map, whose performance is constrained by an API that effectively requires a sub-optimal implementation.

https://codereview.qt-project.org/c/qt/qtbase/+/287053

Yes, agreed, Qt is saner. Also the Borland C++ libraries were usually ok.
On the converse, why would you care about SOLID when implementing an array class? Not everything (or even most things) need to be OO.