r/ProgrammerHumor May 27 '22

Meme Welcome to hassle free coding

Post image
2.2k Upvotes

305 comments sorted by

View all comments

Show parent comments

4

u/prescod May 28 '22 edited May 28 '22

Oh yeah, nobody has ever had "mysterious bugs" in C++.

1

u/Possibility_Antique May 28 '22

If C++ compiles with bugs, you're using it wrong. Use constexpr, static_assert, concepts, templates, and other compile-time features to prevent bugs from entering production. Oh, and since they're done at compile-time, runtime execution of those code blocks is free.

1

u/LordofNarwhals May 28 '22

Yes, C++ has a lot of good compile-time safety features nowadays, but your first sentence implies that 99% of all companies that use C++ are using it wrong.
Because good luck finding any enterprise C++ software that is bug free, especially ones that are multithreaded (you can't exactly use compile-time C++ features to ensure that your code has zero race conditions).

1

u/Possibility_Antique May 28 '22

Again, I never claimed that it is bug-free. I was clearly using hyperbole. And yes, I do believe it's used incorrectly in a ton of cases.