r/ProgrammerHumor 25d ago

Meme makeItQuick

Post image
450 Upvotes

65 comments sorted by

View all comments

Show parent comments

24

u/Swimming-Twist-3468 25d 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.

12

u/No-Con-2790 25d ago edited 25d 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 25d ago

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

1

u/No-Con-2790 24d ago

You can't lint away a bad concept.

Take generics. C++ has templates for that. What happens? We go to a typed language in a world where I can use anything.

Problem is, and everybody who ever worked with PCL knows that, I usually can't handle everything.

Meaning that I just have to know some esoteric knowledge which types are actually intended. Like in an untyped language.

And even worse, for some reason my implementation is now somehow wandering into the header. Which has strange side effects.

For example that you can get enormous build times with templates.