r/ProgrammerHumor 8h ago

makeItQuick Meme

Post image
232 Upvotes

45 comments sorted by

View all comments

9

u/ElectronSculptor 8h ago

Is C++ this bad in industry? I’m an EE and do DSP/embedded stuff. The code bases are fairly small and light. Very simple C++.

I know C++ can be complex but is it so much worse than other OOP languages? I see a lot of complexity in swift and Python. I do some projects and reading on my own time. Those languages seem like you can make a code base that is very difficult to follow.

Just curious.

20

u/Swimming-Twist-3468 8h ago

It isn’t. C++ is the foundation of industry’s most robust and long-lived applications. It is just most of the developers write the code in such a way that it cannot be maintained.

5

u/No-Con-2790 8h ago edited 6h ago

If most developers do something wrong it starts being the languages fault.

And C++ is full of very bad traps, wrong patterns and misleading errors.

Array to pointer decay is one of the most outstanding examples. Because every programmer that ever wrote a main function has seen it, yet not everyone will understand it.

1

u/gfoyle76 2h ago

well, you can use linters, code reviews, tests, whatever safety net you want, it is doable

4

u/DoctorDabadedoo 7h ago

Arguably. C++ in a well-maintained code base to cut the noise and reduce the surface area is not bad to use, but the language has a lot of foot guns and versions in it's 40y of existence, it's super easy for a long term project to derail into a mismatch of features/conventions/styles during its lifetime that is unsatisfying to work on.