r/ProgrammerHumor Jan 28 '23

C++ Meme

Post image
53.6k Upvotes

9.9k

u/reddit-signup-sucks Jan 28 '23

I work with C++ every day, and I'd like to say something in its defense.

4.9k

u/YoungHeartOldSoul Jan 28 '23 edited Jan 28 '23 Starstruck

I'm fairly fresh out of school and into the field, but I'm pretty well prepared to defend the fact that C++ certainly is.

2.5k

u/merlinsbeers Jan 28 '23

What C++ is is is.

3.4k

u/crefas Jan 28 '23 Take My Energy

C++ is definitely one of the programming languages in the world

1.5k

u/DmMeYourBoobs69 Jan 28 '23

Yes, one of the programming languages of all time, maybe ever

993

u/CM436 Jan 28 '23

out of all the programming languages that exist, i can confidently say that c++ is one of them.

471

u/Logical_Strike_1520 Jan 28 '23

Everything y’all said, but also c++

255

u/Apfelvater Jan 28 '23
Int C = 0; //Amount of language, that C++ is
C++;

162

u/Apecc_Legs Jan 28 '23

I can say with certainty that c++ can and absolutely will.

58

u/imdefinitelywong Jan 28 '23

C++ does what it do.

That does what it do, Yugi.

→ More replies

9

u/arasdalll Jan 28 '23

I would like to add that C++, when compared to other programming languages, is comparable with other programming languages, assuming these languages are also used for programming.

→ More replies

13

u/thatCbean Jan 28 '23

You are right, C++ is definitely true

→ More replies

169

u/Foamy-Bot Jan 28 '23

I'll say it.. C++ is the best language for speed and performance for games.

83

u/Jayem163 Jan 28 '23

Now we just need to continue jacking up prices on RAM so efficient programming is profitable again. Oops sorry.. didn't mean to leak it.

14

u/SapientSloth4tw Jan 28 '23

I mean… graphics card prices showcase the importance of efficient programming, well. Mostly. I think they’re more reliant on competing with each other, but there’s something to be said about needing to pay $2k+ to play a 60 dollar game on max graphics cough cyberpunk cough

Edit: maybe they don’t showcase the importance of efficient programming as much as showcase how easily graphics card companies can get away with price gouges because of a lack of efficient programming*

→ More replies

24

u/Decimalis Jan 28 '23

Yeah I've been looking for this one

→ More replies
→ More replies
→ More replies

10

u/SureNectarin Jan 28 '23

Tunnel vision at its finest.

→ More replies

93

u/Worldly_Mechanic_195 Jan 28 '23

I loved it when Bjarne Stroustrup said "It's C++ time".

57

u/devrules616 Jan 28 '23

...and C++ed all over the place...yeah good times !

→ More replies

11

u/pr0ghead Jan 28 '23

One of the most, even.

→ More replies
→ More replies

22

u/xxDolphusxx Jan 28 '23

You can tell from the way it is

→ More replies

16

u/gteriatarka Jan 28 '23

C++ really do be what it is

→ More replies
→ More replies

845

u/illyay Jan 28 '23

I love c++. Maybe it’s something to do with working on game engines.

Then I look at c++ code that isn’t related to game engines. Yup. Sure is a language….

261

u/supernumeral Jan 28 '23

I also love C++. Not a game dev, but I do lot of numerical stuff, solving large systems of equations and that sort of thing. The only other language I’ve used extensively (besides Python for scripting stuff) is Fortran, and C++ is loads more convenient. Modern Fortran does have some useful features, though, but it’s very verbose.

146

u/R3D3-1 Jan 28 '23

I am working on an industry simulation code base written in Fortran. Goodness, what I would give for templates... Our code base as a dozen ad-hoc linked-list implementations and when I needed something akin to a Hash map for representing sparse data, I instead use float-rounded-to-integer indices in an array of a custom type containing a single allocatable data field.

119

u/mandradon Jan 28 '23

I feel like you need a hug.

→ More replies

46

u/supernumeral Jan 28 '23

I feel your pain. I did a fair amount of C++ programming in grad school, and after finishing school I landed a job maintaining/upgrading a very old Fortran simulation code. The switch from C++ to Fortran was very painful for the reasons you listed (and more). Fortunately, the code base was just small enough that, once I figured out how it all worked, I rewrote the whole thing in C++ and now my life is much better.

I hope you at least get to use Fortran 90+. The code I inherited was written in Fortran IV, which was just awful GOTO spaghetti.

15

u/wavefield Jan 28 '23

Why would you do this to yourself?

9

u/supernumeral Jan 28 '23

Job security, I suppose

→ More replies
→ More replies
→ More replies

38

u/vainglorious11 Jan 28 '23

Way more usable than COBOL

52

u/Supercoopa Jan 28 '23

Everything is more usable than cobol. But the entire banking industry being programmed in cobol makes very few things more profitable than cobol

→ More replies

11

u/AnotherEuroWanker Jan 28 '23

It depends on what you intend to do. For popping out tables out of line printers, Cobol was quite good.

→ More replies
→ More replies
→ More replies

95

u/bandana_bread Jan 28 '23

We use various languages at work, and I actually like c++ most. But just like you, I don't really have a list of reasons for it. It just feels right.

But I see junior devs struggle every day when they use or modify some of the more complicated sections, so I can definitely understand the frustration some people have about it.

48

u/flipper_gv Jan 28 '23

Its behavior is predictable and let's you do a lot of optimisation fuckery that other languages don't.

Like C# running the finalizers on a separate thread can cause issues that are hard to debug if you call non thread safe code in it. This is not predictable behavior if you don't know the details of how the language works.

28

u/mikewirkijowski Jan 28 '23

Predictable and neat optimisations.

Youre about to summon an army of rustaceans.

10

u/flipper_gv Jan 28 '23

That's the reason why I want to learn rust too 😅.

→ More replies

7

u/Upbeat-Opinion8519 Jan 28 '23

Simple. Just read the source code for C#.

→ More replies

72

u/Spork_the_dork Jan 28 '23

That is called Stockholm Syndrome.

21

u/IamImposter Jan 28 '23

But I never went there or even met from Stockholm.

→ More replies

50

u/[deleted] Jan 28 '23 edited Feb 17 '23

[deleted]

→ More replies

87

u/KidSock Jan 28 '23

Because game engine devs have to write fast efficient code in a large code base and actually make use of the benefits of C++. Game engine development is on the bleeding edge of software development.

There is a presentation from a lead game engine programmer of Naughty Dog, if I remember correctly, at a programmer conference. And the talk was about writing faster code by understanding how the compiler converts the code to assembly and how you can write your code to make the compiler create better assembly code. And at the Q&A some old fart stood up and basically said “I don’t care. I don’t care about my code being milliseconds faster. Why should I care?” and the presenter basically replied with “People like you are the reason why it still takes minutes for Excel to load”

I imagine a lot of C++ programmers, who don’t work on game engines or anything where milliseconds matter, are like that old fart. And write god awful C++ code.

38

u/AnotherProjectSeeker Jan 28 '23

From my experience I think there's (at least) two ways to make C++ shine.

One is the optimizations you suggest to juice out any possible performance improvement.

The other is that for very large complex projects it lets you build something elegant, extensible and coherent.

Both are made possible by the vastness of features in the language and by the freedom it allows. When a codebase achieves both is a true work of software engineering art.

→ More replies

92

u/firestorm713 Jan 28 '23

That's because game engine code basically strips something like 80% of the language out.

Hilariously, I've worked now at three different companies that use different C++ engines (one Unreal, two custom)

And it's 100% proven the saying "ask any two c++ programmers, and they'll tell you only 20% of the language is usable. But they'll never be able to agree on what 20%."

30

u/NehEma Jan 28 '23

imho 100% of the language is usable. But when you start coding you gotta pick and choose what parts pf it you're using.

Some are almost redundant except in hedge cases, some have varying degrees of complexity, etc.

Just like you don't try to stick an entire thesaurus in an essay.

21

u/SD18491 Jan 28 '23

Be sure to trim your hedge cases at least twice a year. It's the neighborly thing to do.

8

u/RedVagabond Jan 28 '23

They're probably British. You know how they are with the silent "h".

→ More replies
→ More replies
→ More replies

12

u/senseven Jan 28 '23

I know hardcore C++ programmers. They moved their old code bases to v14, and that's it. Don't want new features. After they added layers of strong static analysis, they get warnings and errors in the 100s that tell they do "modern" C++ wrong and there are easier way to achieve things. Usually there is a fix here and there, but there is just no appetite to rewrite the codebases.

Experts can do crazy efficient things with macros, templates and advanced features, but the rationale for those (eg memory footprint or speed) are more or less gone now. There is an argument for elegance, in a sense that you use the power possible in a certain way, but often way longer build times and less traceability is the consequence of this.

→ More replies
→ More replies

15

u/Zestyclose_Link_8052 Jan 28 '23

I can confirm, some c++ projects I work on use microsoft MFC and it makes me wish that c++ isn't a language but unfortuatly it is.

→ More replies
→ More replies

105

u/Dareal6 Jan 28 '23

It’s certainly one of the programming languages of all time

48

u/[deleted] Jan 28 '23

C++ has starships.

238

u/BigHandLittleSlap Jan 28 '23

C++ is one of those languages where anyone who uses it professionally, at scale, definitely has a wiki page that all new starters have to memorise that lists the subset of the language that is allowed.

Like, you know how C programmers are told that they shouldn't overuse the "goto" keyword? That one key word is sort-of banned, right?

Most companies ban huge swaths of C++, not just a couple of key words.

Name another information technology where this is the normal approach.

113

u/0xIsho Jan 28 '23

The most common complaint about C++ is that "it carries baggage" (reasonable complaint). Those wikis are meant to prohibit the use of such baggage or other error-prone constructs in the language. i.e. Only use "Modern C++". The real problem is that different people define that term differently, go figure.

13

u/skwizzycat Jan 28 '23

Everything that was considered modern when they discovered the concept of not just "making it work" = modern

Everything else = legacy bullshit

→ More replies

61

u/Lowelll Jan 28 '23

Most companies ban huge swaths of C++, not just a couple of key words.

Sounds like Yu-Gi-Oh competitive play

12

u/Redstonefreedom Jan 28 '23

lmao man that's a reference that goes back years into my memory

→ More replies

36

u/Guilty_Coconut Jan 28 '23

Industrial Automation. Having loops in a PLC is not done.

15

u/Just_A_Random_Noob1 Jan 28 '23

Except the whole process itself

→ More replies

8

u/EsIsstWasEsIst Jan 28 '23 edited Jan 28 '23

The no loops rule may be true in some places, but its a rather stupid one. A better example would be the obsession with ladder code and the ban on any other language that's prevelant in the US.

→ More replies
→ More replies

31

u/Towerss Jan 28 '23

It's simple. C++ is powerful to the programmer, but dangerous to companies who needs to pay for maintenance and suffers losses from simple programming mistakes.

26

u/SomeOtherTroper Jan 28 '23

I remember a couple of humorous quotes about this.

"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off."

And, in a humor piece about shooting yourself in the foot in various programming languages:

C++ - You accidentally create a dozen clones of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can’t tell which are bitwise copies and which are just pointing at others and saying, “That’s me, over there.”

→ More replies

15

u/OrSomeSuch Jan 28 '23

Name another information technology where this is the normal approach.

Pre ES6 JavaScript

14

u/R3D0053R Jan 28 '23

We haven't banned anything, and damn am I having a hard time with my colleagues' code sometimes.

→ More replies

91

u/BurntOnWinter Jan 28 '23

I’d call it essential just like C. A huge swath of the world’s most fundamental technologies are powered by it. Finance, defense, transport, infrastructure, large embedded, and web (browsers, anyone) all are heavily reliant C++. It’s powering trillions in commerce.

Sure, it’s a complicated overwrought beast, but it doesn’t quietly die off to academia or intern duty like FORTRAN and Perl because of how essential and embedded it is. Most of it chugs along without you ever noticing. I find calling Java robust and C++ not when I’ve never known a Java project that didn’t need to be continuously babied, fed hardware and JVM tuned, while similar C++ projects quietly chug away on a closet potato server for a decades to be rather funny.

Hatred and disgust are normal, sane reactions to C++. But I do respect in the way I’d respect a scarred ugly old pit fighter.

28

u/GogglesPisano Jan 28 '23

With the exception (ha!) of C, all of the other languages in OP’s list were created with C++.

→ More replies
→ More replies

56

u/MrUnoDosTres Jan 28 '23

C++ is C plus one

36

u/AverageComet250 Jan 28 '23

Yes but at evaluation it’s still C

12

u/R3D0053R Jan 28 '23

I would argue that C++ is C, but C is C+1 after C++

→ More replies
→ More replies
→ More replies

137

u/RonHarrods Jan 28 '23

The joke's going over my head

283

u/Aise_314 Jan 28 '23

The joke is that they can’t think of something good to say 😔

97

u/SHv2 Jan 28 '23

Nothing to say when everything's already been said.

57

u/OpalescentLizard Jan 28 '23

And I will recite the things that have been said for those who missed it:

7

u/IamImposter Jan 28 '23

And also the following:

→ More replies
→ More replies

21

u/IAmTheClayman Jan 28 '23

The joke is they didn’t say anything. Variations include “I’d like to say something in its defense, but I can’t think of anything” and “I’d like to say something in its defense, but…” Speaker throw themself out the nearest window

→ More replies
→ More replies

49

u/LetTheWorldBurn2023 Jan 28 '23

She's actually doing it. "C is essential but C++"

14

u/firestorm713 Jan 28 '23

C++ is one of the languages of all time that I've worked with.

→ More replies

3.3k

u/[deleted] Jan 28 '23

I started working with C++ and I can tell you about it.

1.3k

u/TheShredda Jan 28 '23

In engineering we had a course on C in first year and then C++ second year. C++ definitely was.

783

u/Tsu_Dho_Namh Jan 28 '23

My university did it the same way and it made me love C++.

"So convenient!" I thought, being able to use classes, and having destructors automagically deallocate resources for you. Plus getting to use strings instead of char* and vectors that we can resize at runtime. Not like those fucking C arrays.

Little did I know, pretty much every modern language is even more convenienter.

349

u/throw3142 Jan 28 '23

The problem isn't even that modern languages are more convenient. There is a real niche for systems languages with object-oriented features. The problem is that C++ is burdened by heavy backwards-compatibility requirements, it's unsafe by design, the ecosystem is a mess (it's so hard to link dependencies, compared to literally every other language including C and even raw assembly), and there is no consensus on style because there are so many ways to do the same thing (e.g. pointer vs reference vs rvalue reference vs smart pointer, #define vs constexpr, CRTP vs inheritance, throw exception vs return error code vs set errno, explicit cast vs implicit cast, lock_guard vs scoped_lock, #ifndef vs #pragma once, .cc vs .cpp file extension, .h vs .hpp file extension).

105

u/marti_2203 Jan 28 '23

Some of these things are solutions from different periods (smart pointers and the things before it, ifndef and pragma once) but I think the inheritance and CRTP solve vastly different problems. And thank you for reminding me about .cc vs .cpp

21

u/merlinsbeers Jan 28 '23

vs .C vs .CC

No really. There were people using .c for C and .C for C++. On Windows.

→ More replies

35

u/throw3142 Jan 28 '23

Yeah I totally agree, each of these variants is different for a reason, and each one has its place. That doesn't stop them from being mixed together in weird combos and making the codebase completely unreadable lol

→ More replies
→ More replies
→ More replies

64

u/sausage-superiority Jan 28 '23

I have imposter syndrome.

I’ve been trying to get motivated enough to learn C++. I use JavaScript and Python for work but I’m not a REAL developer because I don’t use C.

36

u/SmArty117 Jan 28 '23

Do you need to learn C++ though? Do you have your eyes set on a career in it that pays better or is more interesting?

Cause I have been writing C++ as a job for a few years, and I'm going through a book on modern C++ and let me tell you, the can of worms is deep and not pleasant at all. It feels great when you get something right that you struggled for, but sometimes it's just a pain to get anything working that in another language would be trivial.

32

u/sausage-superiority Jan 28 '23

Oh you’re absolutely right.

I’m fine for money. The ONLY reason for me learning C++ is that I feel inadequate for not knowing it. It’s purely vanity.

26

u/SmArty117 Jan 28 '23

Heh fair enough, I totally get wanting to do the "difficult stuff" just for self-esteem. I'd also consider Rust - also kinda hard to grasp, but pays off a lot better when you do IMO. Good luck!

→ More replies
→ More replies
→ More replies

11

u/SeveralPrinciple5 Jan 28 '23

Don’t worry about it. You’re a real developer if you can write code that works, fails gracefully, and handles edge cases correctly. Extra points if you can design code whose failure mode gives clues as to the cause of the failure, which can be easily understood by others, and which is extremely extensible.

It doesn’t matter what language you do it in. Also, you can know a dozen languages and if you can’t do the above, it doesn’t matter.

(Once you get to a certain point, new languages stop mattering. When you know how to decompose a problem in a procedural language, an OOP, and a functional language, pretty much any new language is just a matter of syntax.)

→ More replies
→ More replies
→ More replies
→ More replies

29

u/EpicResus Jan 28 '23

about what

PLEASE I NEED ANSWERS

39

u/UBoiii_ Jan 28 '23

‎

47

u/sarthakkalpasi Jan 28 '23

he already told it

→ More replies
→ More replies

1.7k

u/CheekApprehensive961 Jan 28 '23

C++ is one of the languages.

488

u/Saad5400 Jan 28 '23

One of the languages ever.

64

u/Xen0n1te Jan 28 '23

the morbius of programming languages

18

u/arbitrarycivilian Jan 28 '23

It’s plusin’ time

7

u/ApaleusAldore Jan 28 '23

And then the C plused all over the place... Truly one of the moments of all time

→ More replies

20

u/infreq Jan 28 '23

One of the most, in fact

→ More replies

913

u/HopeChaseLock Jan 28 '23

C++ users tell something

1.3k

u/atomic_redneck Jan 28 '23 Wholesome Seal of Approval

I recently retired after more than 25 years of C++. I can tell you that the best thing about C++ is how good it feels when you stop.

331

u/glarung Jan 28 '23

You get to retire after 25 years.

You get to retire!

That.

That is impressive!

167

u/zoinkability Jan 28 '23

There it is:

C++ PAYS THE BILLS AND SOCKS MONEY AWAY IN A 401K

54

u/glarung Jan 28 '23

Right!

Python was initially released in 1991

https://pythoninstitute.org/about-python#:~:text=Python%20was%20created%20by%20Guido,released%20on%20February%2020%2C%201991.

How many people can say that they retired from being a Python developer in 2016?!

74

u/itsamberleafable Jan 28 '23

I can say that!

(I haven’t but I can say it)

→ More replies
→ More replies

13

u/atomic_redneck Jan 28 '23

That was 25 years of C++. There were 15 years of Fortran before that.

→ More replies

12

u/HopeChaseLock Jan 28 '23

Yeah, see it has one good thing 🥲.

Happy Retirement!! Goodbye to all the pressure, welcome the endless leisure.

→ More replies

41

u/bunkley_ Jan 28 '23

It is the go to Programming language for learning Data Structures and Competitive Programming. If you do DSA in C++, you can easily switch to any other language no problems. Also used in Game Engines. But when it comes to Web/App development, it gets overshadowed by pretty much all the other languages

18

u/Fangluin Jan 28 '23

But when it comes to Web/App development, it gets overshadowed by pretty much all the other languages

That's just a matter of libraries, though, not of the language itself. I have to use Java now, writing microservices and the like. It's horrendous.

→ More replies
→ More replies
→ More replies

1.8k

u/vizbones Jan 28 '23

Why don't Ruby programmers use other languages?

Answer: They're not aware that there are other languages.

679

u/spin-itch Jan 28 '23

Listen here you little shit

249

u/djudji Jan 28 '23

This response is a "gem"

36

u/Zeragamba Jan 28 '23

then again, ruby devs are railroaded into the same library

→ More replies
→ More replies

200

u/jfmherokiller Jan 28 '23

they atleast have stuff like ruby on rails perl is well perl.

96

u/grey_hat_uk Jan 28 '23

Perl is one of the greatest and most powerful languages to write.

Now if you ever have to read it you're screwed and will have to slaughter 6 goats, 3 chickens and a hamster to make sure you don't break one of the 20 operations in each line just by looking too hard.

53

u/Oukaria Jan 28 '23

My manager is an old school dev, he always go by « heee fuck it I’ll do it in perl » and give me the code, I use it and it works perfectly but everytime I try to read it my brain explode. Fucking one line magic.

15

u/arobie1992 Jan 28 '23

I've never used perl, but from what I can gather it's in the same boat as regex. Very terse syntax that as a result has a fairly steep learning curve, but once you figure it out it's actually not too bad and you feel like a fucking wizard.

→ More replies

22

u/Uberzwerg Jan 28 '23

I have trained/onboarded several people into our company in the past decade and one of the most important lesson i have to get across is to NOT do all that fancy stuff you can do in Perl.
90% of it is just "write as you would do in any other language" and be happy for great support for RegEx + network (which is 50%+ of the job anyway)

But by working on that priniple, we have a readable Perl code base.

→ More replies
→ More replies

80

u/okay-wait-wut Jan 28 '23

When are emerald, diamond, sapphire and garnet going to get languages?

93

u/Burger_Destoyer Jan 28 '23

Sorry I didn’t realize coding became gen IV Pokémon.

16

u/StanleyDarsh22 Jan 28 '23

Wait isn't ruby/sapphire gen 3

→ More replies
→ More replies

21

u/reventlov Jan 28 '23

1984, maybe 2006?, 2010 or 2000, 2022ish or possibly 2003 or 2013.

As a general rule, any random, vaguely-common noun is already the name of at least one, and usually multiple programming languages.

8

u/Shikogo Jan 28 '23

What about Steven?

→ More replies
→ More replies
→ More replies

39

u/zerokelvin273 Jan 28 '23

Nonsense, there's Elixir.

And JavaScript, we can't escape the JavaScript.

7

u/thespud_332 Jan 28 '23

We're aware there are other languages. But only the ones that are default in the monolith.

7

u/DanSensei Jan 28 '23

Nah, we use JavaScript as part of a Rails stack.

→ More replies

833

u/BobSanchez47 Jan 28 '23

C++ is Segmentation Fault: core dumped

419

u/Sexy_McSexypants Jan 28 '23

“ok, you wanna tell me what went wrong and where?”

“no, fuck you, Segmentation Fault”

88

u/throw3142 Jan 28 '23

I just got a segmentation fault in Python :D

Fun times

It's 3 am, I should go to sleep

46

u/Valmond Jan 28 '23

Prolly in a third-party library.

93

u/CuriousProgrammer72 Jan 28 '23 edited Jan 28 '23

Prolly in a third-party library

That has C++ bindings lol.

→ More replies

51

u/Sinomsinom Jan 28 '23

If you do stuff in python where 99.5% of the actual work isn't done in a library not written in python you're using the wrong language.

57

u/Seanxietehroxxor Jan 28 '23

Python: the best language to call into libraries written in completely different languages.

→ More replies
→ More replies
→ More replies

42

u/maubg Jan 28 '23

U can compile it with debug symbols and then use a debugger like gdb

→ More replies

16

u/DistilledProblems Jan 28 '23

gcc file.c -g then gdb

40

u/bad_investor13 Jan 28 '23

Surprise! Now the program works!

9

u/fireflash38 Jan 28 '23

Break out the valgrind, because you have a bounds access issue.

→ More replies
→ More replies

10

u/LittlebottomCheery Jan 28 '23

If it crashes then you're happy. You can debug it. But C++ sometimes doesn't crash, it just does "something"

→ More replies

27

u/ArthurM_R2 Jan 28 '23 edited Jan 28 '23

A lot of begginers struggle with debugging this. Segmentation fault is not specific to C or C++. In fact this is a runtime exception signalled by memory hardware. The compiler is not concerned with this at all, since it's job is to make your instructions executable. Whether some memory access is an access violation or not is only decided by the MMU once the OS tries to execute the specific instruction. As to what went wrong - segmentation fault is always related to memory access (dereferencing pointers, accessing array indices out of bounds, etc). The computer cannot tell you what part of the source code is at fault - after compilation the PC only executes machine code which has little to do with your source and nothing else. To find out what went wrong you can use a debugger such as gdb which keeps track of instruction-to-source mappings. Hope I helped!

Edit: beginners struggle with debugging, not segfaults themselves, everyone has their fair share of segfaults

→ More replies
→ More replies
→ More replies

424

u/Keatosis Jan 28 '23

Being a game Dev in a general programming sub is like being the one American in a group of British people. We all speak the same language but I feel like I'll be stabbed to death at any moment.

I like C++ it's good for games.

91

u/moops__ Jan 28 '23

I work with C++ in computer vision and it's great. When performance is important it becomes easier to work in C++. Maybe Rust will replace it one day but it's not there yet.

→ More replies

59

u/TheAlexGoodlife Jan 28 '23

Its the only real good language for graphics programming really. C is also a contender but C++ has so many libraries that make the job easier

→ More replies

8

u/BigBearSpecialFish Jan 28 '23

Work in particle physics and c++ is always the language of choice for us too. When you need to do very specific tasks very quickly it's hard to beat

→ More replies
→ More replies

491

u/Ursomrano Jan 28 '23

Why are people dunking on C++? I’m new to C++ so I see no problem with it.

85

u/Broadkast Jan 28 '23

there's a lot of ways to do things, which can make it difficult to know the right tool to use at any given time. just one of the quirks of a language that's had so many iterations over the years

→ More replies

712

u/CaptSoban Jan 28 '23

Last week it was java, today it’s C++. People like to complain about stuff they just started learning in school.

190

u/SomeRandomEevee42 Jan 28 '23

We're like twitter, we find something to unrealistically hate by using a random number generator, then we hate on it for less than a week, and realize there's nothing to really hate on, and move on to the next

35

u/Fillicia Jan 28 '23

In case we forgot we default to Python's whitespace and/or html not being a programming language. Rinse and repeat.

→ More replies
→ More replies

31

u/MutableReference Jan 28 '23

It was C++ before Java, with Java being a response to C++ iirc, funny how that works lol

→ More replies

27

u/perensap1 Jan 28 '23

Next week PHP again?

52

u/Interest-Desk Jan 28 '23

Every week is PHP.

→ More replies

16

u/Solest044 Jan 28 '23

It's a meme subreddit. More importantly, there have been several polls that show something like 70%+ of this subs demographic (that answer polls) are students.

I get a good chuckle now and then from the memes, treat everything as hyperbole, get the occasional gem from some random veteran in the comments, and try to not take anything very seriously.

→ More replies

14

u/Mysticpoisen Jan 28 '23

Last year this sub was praising C++ it's just the new thing to meme on without any cause.

212

u/BL1NDX3N0N Jan 28 '23 edited Jan 28 '23

Ignore it. Most people who bash it are those who don't know how to use it. Everyone wants to talk nice about C because they know it's used to create foundations, but they themselves don't even know how to use it. For them, it's just "important" because most of their OS was developed with it. The other languages that were listed are extremely high-level languages executing on runtimes that abstract away all the "big scary complex things". I bet she's a beginner web developer and I highly doubt she's ever written a single line in both C and C++...

→ More replies

10

u/Lophyre Jan 28 '23

C++ focuses on backwards compatibility rather than evolving the language which has led to a lot of bloat over the years with duplicated features and hard to read syntax

19

u/jfmherokiller Jan 28 '23

the language is good it just has so many ways to perform the same operation which can lead to "rope to hand yourself with" situations.

→ More replies

435

u/LikeLary Jan 28 '23

-What is my purpose?

+You make games.

-Oh my god.

54

u/richh00 Jan 28 '23 edited Jan 28 '23

Fairly sure they use it in the stock exchange to make money quicker because its fast.

void checkStock(int stock) { if (stock > 0) { cout << “SELL SELL SELL” << endl; } }

42

u/Ythio Jan 28 '23 edited Jan 28 '23

I work in a big bank. There are trading bots in C# as well (and a lot of other applications in C# or Java).

If you really want to go high frequency trading, you write at C or C++ abstraction level and it gets converted to registry transfer level, or RTL (conversion is called "high-level synthesis") to run on FPGA cards.

RTL is the abstraction level of hardware description languages like VHDL where you describe logic circuits.

Giving you keywords for Google if you want to read more.

→ More replies
→ More replies

14

u/metaglot Jan 28 '23

C++ is used everywhere you want fast and stable code. It has a big in in embedded systems.

→ More replies
→ More replies

181

u/desabsinilatS Jan 28 '23

I like C++.

81

u/Lobster2311 Jan 28 '23

It makes me feel like a real programmer

→ More replies
→ More replies

89

u/[deleted] Jan 28 '23

C++ is CLASSY

..I'm sorry, I had to.

→ More replies

258

u/swegj Jan 28 '23

“JavaScript is Powerful”. Oxymoron

108

u/tylerr514 Jan 28 '23

It is incredibly powerful in the sense of its ecosystem, but yeah, not in performance.

108

u/Sir_IGetBannedAlot Jan 28 '23

It's powerful in the sense of how much it makes me want to die.

→ More replies
→ More replies

29

u/Studds_ Jan 28 '23

Serious question. What does that even mean? Not just JS because I’ve seen that mentioned for nearly every language. What does someone even mean when a PL is “powerful?” Powerful how

25

u/5plicer Jan 28 '23

Drains your phone's battery quickly.

→ More replies
→ More replies

50

u/JaSper-percabeth Jan 28 '23

C++ is a little from everything

54

u/brendan250 Jan 28 '23

Everything is a little from C++

→ More replies
→ More replies

19

u/[deleted] Jan 28 '23

[removed] — view removed comment

→ More replies

114

u/Servious Jan 28 '23

If I had to "finish" this meme I'd say C++ is actually robust and I'd change Java to "consistent"

I feel like java's rules make a lot of sense the vast majority of the time. I feel like there's very few "gotchas" in the language and the language works how you expect in almost every situation.

76

u/colei_canis Jan 28 '23

Java itself doesn’t have many gotchas but it’s a bit of a pompous old country squire of a language, it won’t do anything without the appropriate ceremony and complains at great length about the decline of society in the form of a stack trace the length of your arm if you get any of it wrong.

It’s a decent language I’d still pick over many others though. Nobody ever got sacked for picking Java, but the sheer verbosity does make you feel like you’re writing a treatise rather than code.

23

u/dt7223 Jan 28 '23

This summarizes Java extremely well. It's not a bad language, I just feel like everything requires 10x as much effort compared to everything else. I enjoy C++ more than it, because it's more succinct.

18

u/colei_canis Jan 28 '23

I think I should add the JVM is a really good platform because memes from the ‘00s aside it can be genuinely very performant, is widely supported, and has been around donkey’s years now. My favourite languages are alt-JVM languages, Kotlin and increasingly Scala the more I learn the latter.

I think languages kind of absorb the social environment they are written in, Java was written originally for huge enterprises where excessive verbosity isn’t really an issue and sometimes even an asset. More modern languages often were written in a less rigid corporate environment and I think this is reflected in them. Python would be the other end of the spectrum, I love Python in many ways it’s a wonderful language for just getting shit done but you can tell what its priorities are because its package management is genuinely not worth the steam from our collective piss, when I was writing it professionally most of the really horrible arseaches involved dependency management.

The reason everyone loves Rust probably has to do with the fact it was one guy at Mozilla’s passion project for a while which I think would be a dream job for many. C might win hearts because of its association with the astronomically based K&R too.

→ More replies
→ More replies
→ More replies

16

u/Live-Sail4354 Jan 28 '23

C++ is one of the programming languages ever made!

113

u/frakod Jan 28 '23

You accidentally replaced JavaScript and C++ one, don't worry, rookie mistake.

→ More replies

70

u/amineris Jan 28 '23

C++ is MASTERRACE

→ More replies

36

u/yourteam Jan 28 '23

C++ is great.

Also is java that robust?

→ More replies

16

u/potuler Jan 28 '23

C++ is the best and weaklings cannot handle it

46

u/JuggernOtt81 Jan 28 '23

C# is the CULMINATION

→ More replies

9

u/RatherBetter Jan 28 '23

C++ is C plus plus

15

u/Antact Jan 28 '23

That's a rare username OP.

→ More replies

22

u/YourUndoing Jan 28 '23

lol Robust

27

u/deanrihpee Jan 28 '23

Java is not ROBUST, it's VERBOSE

10

u/rifain Jan 28 '23

We use it a lot in the financial field. We have java app servers running for weeks handling hundred of thousands of transactions a day without any issue. Java is robust indeed, it's why it's so prevalent in industry. However, it requires to know a bit about tuning it's garbage collection settings.

→ More replies

49

u/CraftOk7730 Jan 28 '23

"JavaScript is POWERFUL" -- what a joke

→ More replies