←back to thread

In Defense of C++

(dayvster.com)
185 points todsacerdoti | 6 comments | | HN request time: 0s | source | bottom
Show context
justicehunter ◴[] No.45268277[source]
I'm not sure what I feel about the article's point on boost. It does contribute a lot to the standard library and does provide some excellent libraries, like boost.Unordered
replies(1): >>45268510 #
Night_Thastus ◴[] No.45268510[source]
Boost is an awful whole with a couple very nice tiny parts inside.

If you can restrict to using the 'good' parts than it can be OK, but it's pulling in a huge dependency for very little gain these days.

replies(1): >>45270833 #
1. thelittlenag ◴[] No.45270833[source]
I'm old enough to recall when boost first came out, and when it matured into a very nice library. What's happened in the last 15 years that boost is no longer something I would want to reach for?
replies(1): >>45270973 #
2. Night_Thastus ◴[] No.45270973[source]
C++11 through 17 negated a lot of its usefulness - the standard library does a lot of what Boost originally offered.

Alternative libraries like QT are more coherent and better thought out.

replies(2): >>45271768 #>>45273005 #
3. fluoridation ◴[] No.45271768[source]
Qt is... fine... as long as you're willing to commit and use only Qt instead of the standard library. It's from before the STL came out, so the two don't mesh together really at all.
replies(1): >>45275956 #
4. jcelerier ◴[] No.45273005[source]
I use boost and Qt but completely disagree. Every new version of boost brings extremely useful libraries that will never be in std: boost.pfr was a complete game changer, boost.mp11 ended the metaprogramming framework wars, there's also the recently added support for MQTT, SQL, etc. Boost.Beast is now the standard http and websocket client/server in c++. Boost.json has a simple API and is much more performant than nlohmann. Etc etc.
5. Night_Thastus ◴[] No.45275956{3}[source]
In my experience I've had no issues. Occasionally have to use things like toStdString() but otherwise I use a mix of std and qt, and haven't had any problems.
replies(1): >>45276378 #
6. fluoridation ◴[] No.45276378{4}[source]
That's basically what I mean. You have to call conversion functions when your interface doesn't match, and your ability to use static polymorphism goes down. If the places where the two interact are few it works fine, but otherwise it's a headache.