←back to thread

In Defense of C++

(dayvster.com)
185 points todsacerdoti | 3 comments | | HN request time: 0.418s | source
Show context
fouronnes3 ◴[] No.45268145[source]
This is a good article but it only scratches the surface, as is always the case when it comes to C++.

When I made a meme about C++ [1] I was purposeful in choosing the iceberg format. To me it's not quite satisfying to say that C++ is merely complex or vast. A more fitting word would be "arcane", "monumental" or "titanic" (get it?). There's a specific feeling you get when you're trying to understand what the hell is an xvalue, why std::move doesn't move or why std::remove doesn't remove.

The Forest Gump C++ is another meme that captures this feeling very well (not by me) [2].

What it comes down to is developer experience (DX), and C++ has a terrible one. Down to syntax and all the way up to package management a C++ developper feels stuck to a time before they were born. At least we have a lot of time to think about all that while our code compiles. But that might just be the price for all the power it gives you.

[1] https://victorpoughon.github.io/cppiceberg/

[2] https://mikelui.io/img/c++_init_forest.gif

replies(4): >>45268251 #>>45271645 #>>45273605 #>>45277835 #
jjaksic ◴[] No.45271645[source]
Wow, I don't understand what anything means in those memes. And I'm so glad I don't!

It seems to me that the people/committees who built C++ just spent decades inventing new and creative ways for developers to shoot themselves in the foot. Like, why does the language need to offer a hundred different ways to accomplish each trivial task (and 98 of them are bad)?

replies(2): >>45271703 #>>45273671 #
1. account42 ◴[] No.45273671[source]
Ignorance is not something you should be proud of.
replies(2): >>45273847 #>>45275414 #
2. TheOtherHobbes ◴[] No.45273847[source]
C++ is the only language which invests in archaeology over futurism.

You get to choose between 25 flint-bladed axes, some of which are coated in modern plastic, when you really want a chainsaw.

3. saghm ◴[] No.45275414[source]
Being wise enough to know what's worth spending time to learn is, though. Knowledge isn't free.