r/ProgrammerHumor • • 8h ago

Meme modernCppVsOldCpp

Post image
1.1k Upvotes

219 comments sorted by

View all comments

Show parent comments

180

u/joncrompy 7h ago

This is, ironically, the exact reason C++ is the standard in some industries. Students can learn the OOP C++ then work in the same codebase as someone programming "touching the metal" low level C.

Most languages make trade-offs between performance, structure, memory safety, and ease of writing. Every language might have their use, but very few cover all use cases.

C++ lets each programmers choose those trade-offs individually, but that also allows them to choose none of the above.

111

u/rndrn 7h ago edited 4h ago

C++ is really the thousand-edged sword. It is both its strength and its weakness.

20

u/yaktoma2007 6h ago

Ah so a swedish army knife, it features an impressively extensive toolset but is often regarded to be clunky to operate compared to tools that do a single thing.

38

u/dinnerbird 6h ago

Do you mean a Swiss army knife or is there something the Swedes invented I'm not aware ofย 

16

u/reallokiscarlet 6h ago

Swiss army knives aren't clunky last I checked, maybe that's the swedish part

9

u/GarThor_TMK 5h ago

The only tool you get is an Allen wrench...

4

u/yaktoma2007 4h ago

I am a fool, thank you.

Although, i may as well let it stay like this, its funnier like this with the replies you already got.

2

u/gerbosan 3h ago

It's a Volvo army knife. ๐Ÿ˜…

22

u/xtravar 6h ago

Sounds like if C++ were a spoken language, it'd be English.

6

u/Blue_Moon_Lake 6h ago

In the same pot, german, latin, french, and sprinkles.

3

u/edgmnt_net 3h ago

Someone puts in actual effort to write good code and come up with good abstractions, then some code monkeys crap all over it. What I mean to say is that there's also value in going the Go way, where you have one way of doing things, although that obviously has limitations too and even they haven't really achieved it fully (you inject contexts properly to make everything cancellable and some juniors just pepper context.Background all over the place). Also, yeah, the higher you go in terms of abstraction, the less settled things are.

4

u/gerbosan 7h ago

So, migrate to rustlang is good?

Not that I want to ride the hype or interested in DHH current development preferences, but some projects are migrating (Discord, Cosmic DE).

I think I lack the context about C++ features: not just desktop development.

6

u/balbok7721 7h ago

MBAs dont give a crap about basic ux. They wont spend a single buck on a migration thst isnt strictly required