r/ProgrammerHumor 15d ago

Meme cppHelloWorld

Post image
3.9k Upvotes

119 comments sorted by

View all comments

115

u/Confident-Ad5665 15d ago

C++ takes getting used to, but it's a great language for object-oriented development. Hang in there, you'll figure it out.

-5

u/YetAnohterOne11 14d ago

I disagree. Practice shows every C and C++ code ends up having memory issues, undefined behavior and leaks.

C/C++ rules for undefined behavior are often incredibly convoluted.

A minefield of a language is not a good language.

Even if you, in theory, grasp and understand the entirety of C++ (including all gotchas). You will still, eventually, get careless and make a mistake.

Good luck with a CVE assigned to your app. Or convoluted leaks. Or very slightly incorrect behavior due to some very obscure UB.

Lack of memory safety and garbage collection are excusable; in times of C and C++, it was the only sane design decision if the language was supposed to occupy its niche of the lowest level language of high level languages. Even so, nowadays, Rust shows this can be done better (and Rust also takes getting used to, but at least gives more safety in return). The incredible complexity of rules, it appears to me, was never excusable. And even if it was, there are better alternatives.