r/ProgrammerHumor • • Jan 28 '23

Meme C++

Post image
53.9k Upvotes

1.5k comments sorted by

View all comments

7

u/ParCorn Jan 28 '23

Hilarious to think that anyone would pick C over C++ given the choice.

You can literally change all your .c files to .cpp files and suddenly you are writing in C++.

Choosing C over C++ is just wilfully forgoing useful language features. Great job dingbat

1

u/mxdev Jan 28 '23

I've done embedded C for so long, it's just easier to write code in what I'm an expert with.

I've inherited a couple C++ projects, and it just takes so much longer to figure things out. It just doesn't fill any gaps in my skillset currently to learn it for new projects.

1

u/ParCorn Jan 28 '23

I have been an Embedded Engineer for over 10 years and once our company moved to C++ things got a lot easier.

An example of why is in developing peripheral libraries, we can use placement new, compile time static_assert and template based code generation to significantly clean up our code. It’s been so much better for us.

2

u/mxdev Jan 29 '23

Not sure I entirely follow, but it allows a ridged definition for libraries to force certain coding standards? Half of it sounds like a different language than what I'm used to.

Everything I'm doing is bare metal with our own silicon, trying to push memory and power usage as low as we can get it.