Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Here's a C++ Conspiracy Theory for You (lucisqr.substack.com)
1 point by funny_falcon on Jan 8, 2024 | hide | past | favorite | 1 comment


It's a video where the speaker says the conspiracy theory, while the video shows irrelevant gameplay.

The argument starts with the thesis that "you should use modern C++ everywhere" is generally meant to mean "you should use value semantics everywhere."

This is odd to me since my C++ experience is from the 1990s when "you should use modern C++ everywhere" often meant "use string instead of char *" and "use new instead of malloc". I see the emphasis on using value semantics as being a delta on top of the older meaning, where the old meaning still exist, but the speaker just naturally assumes them to be correct.

I don't have much experience with modern C++ but I thought the speaker's complaints about "this begin() and end() everywhere" has been (mostly?) resolved with range-based for loops added in C++11 and various improvements since then, and the complaint about string split has been resolved with std::ranges::views::split in C++20, like the example at https://en.cppreference.com/w/cpp/ranges/split_view .

Which makes it sound like those issues can be resolved by ... using modern C++ everywhere.

The author correctly highlights how some standard library components have faster equivalents elsewhere, concluding "so they provide the STL for you and it's a piece of crap, right? But you have to use it because it's the modern way to do thing."

Thing is, the author already pointed to Boost as a faster alternative for map, for example. Using modern C++ does not mean only using the STL.

The author seems to think that people using Boost are generally considered dinosaurs. Which doesn't fit my understanding.

I stopped listening about 5 minutes in when the author said the concepts behind the movement to use modern C++ are "virtue signalling". It's a culture war term that has no real useful meaning here, and a far more appropriate term is "shibboleth".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: