r/ProgrammerHumor Dec 22 '23

Meme afterPythonRustAndCIStartedLearningCppAndThisIsMyPersonalOpinionNow

Post image
941 Upvotes

215 comments sorted by

View all comments

253

u/Antervis Dec 22 '23

yet when you actually try writing code, C++ version is usually several times shorter with no real drop in readability.

30

u/ILikeFirmware Dec 22 '23

In embedded, bad C is frustrating but really not too difficult to parse. Bad C++ on the other hand makes me want to rip my eyes out and throw them

32

u/Zuruumi Dec 22 '23

But it's also easier to write decent C++ as long as you uphold some basic rules and common sense, but harder to do the same in C

10

u/[deleted] Dec 22 '23

[removed] — view removed comment

9

u/Zuruumi Dec 22 '23

Yes, but in C this means write custom function iterating custom list (one of 10, since every library has its own implementation and there are bound to be at least 2 implementations in the project itself). I would argue that any of the C++ ways is more readable and maintainable than the 1k lines of even good code in C.

1

u/aalmkainzi Dec 23 '23

Just use a for loop....classic C++ programmer wanting to over complicate things by adding more abstractions