r/cpp • • Sep 25 '26

Why C++ is so hated!!!

I love C++. High level + low level at the same time. But Linus Torvalds don't want C++ in the Kernel, industries hate it, people hate it but why? Why be so angry? Memory management? I mean ok maybe it has problems that I don't even see but why so much hate.

For me it's really sad! šŸ˜ž

Why something so powerful it's so hated. Now I feel "strange" doing projects in C++ because… sometimes I question myself "Why do I write C++ code if people hate it". Can someone explain what is happening and… can I use C++ for fun in peace?

0 Upvotes

104 comments sorted by

33

u/FckXFckMusk Sep 25 '26 • Bravo

Most people don't know why they hate stuff, they just hate it because someone or something told they should.

6

u/ilPlayerdiGD Sep 25 '26

I agree

6

u/yazilimperver Sep 26 '26

I also agree that, people should understand that it is just a tool and as a software engineer, it need to be used carefully and in locations suitable for the intended purpose.

Nevertheless, i like it because, it allows me to execute my ideas in various ways and offers flexibility with maximum performance.

I can't say there aren't emotional reasons, either šŸ˜…

1

u/ilPlayerdiGD Sep 29 '26

How is to be a "software engeneer"? I maybe want to become a software engeneer so I'm only asking.

2

u/yazilimperver Sep 29 '26

Getting a degree might be an option or great start, but it's not the whole story. You also need to have sharp analytical thinking, the ability to break complex problems into manageable solutions and having fun dealing with problems, Imho.

1

u/ilPlayerdiGD Sep 30 '26

Wait… can I learn the "analytical" stuff while I'm a junior maybe in job? I don't have a degree and I'm not intelligent šŸ„€

2

u/yazilimperver Sep 30 '26

Why not, solve small problems daily, ask why, before jumping to a fix, break big tasks into tiny steps, solve them as fully understanding each step and underlying problem.

Do that at your junior job and the analytical stuff will come. The degree might be optional, but the practice isn't.

1

u/ilPlayerdiGD Sep 30 '26

So "Just do experience"

2

u/yazilimperver Sep 30 '26

Exactly; imho, having such concern is an indication that you will handle it šŸ˜‰

2

u/ilPlayerdiGD Sep 30 '26

Wow thanks! šŸ˜‚. Well first I need to learn C++. Like I know 0.0000000000000000000001% of the like 1 million feature of C++ šŸ„€.

36

u/No-Dentist-1645 Sep 25 '26 edited Sep 25 '26

It's not hated. Tons of companies and software use C++, it's extremely popular in that aspect. There are just places and contexts where it is a good choice, and places where it isn't.

They tried to use C++ in the kernel before, realized it wasn't that good of a fit, and moved on. Nothing to be sad or hold grudges about that.

12

u/delta_p_delta_x Sep 26 '26

They tried to use C++ in the kernel

This is really just a Linux problem. Other OS kernels use C++ just fine. See: Windows, macOS.

3

u/donaljones Sep 29 '26

While Windows uses C++, I don't think the NT kernel uses it. Don't know about Apple. BeOS is also known for its extensive use of C++, but I don't think its kernel used C++ either.

9

u/pjmlp Sep 26 '26

Contrary to Linus hate for C++, other operating systems do use C++ in the kernel.

Yes it is a subset, just like no C written OS uses full ISO C on the kernel.

1

u/ilPlayerdiGD Sep 25 '26

Oh. Well C++ is good for game. Am I right? Onestly I use SDL2 for making game in C++. I like the abstraction of C++. I'm more calm now. Thanks ā¤ļø

-2

u/No-Dentist-1645 Sep 25 '26

Depends on the game, tbh. If it's a simple-ish 2D game, then yeah definitely, C++ is great and there are very neat libraries such as Raylib for them, which imo is nicer than SDL2. But for more complex games or 3D ones, there's a reason why people use game engines like Unity or Godot for them

2

u/ilPlayerdiGD Sep 25 '26

Wait… My whole path is creating 3D games in SDL2 + OpenGL. I don't want to use a boring engine! I want to learn like EVERYTHING. Yeah I'm trying to do the hard things. At least I'm trying šŸ˜­šŸ˜‚

2

u/serviscope_minor Sep 29 '26

This is good! There's nothing like doing it all from scratch and having the entire thing in your head. If you're not on a budget for a client, then this is a great way to do things since it's frankly a lot of fun and really useful. I think you'll have a blast.

1

u/ilPlayerdiGD Sep 29 '26

Thanks! Yeah it's a little hard not because it's really hard but because it's slow. On Godot I'm creating a 3D game and I'm in a good point in just a few days! Something that with raylib could cost me weeks and weeks! Only for this projects because I want to create a horror game in OpenGL! :).

1

u/yazilimperver Sep 26 '26

If you want to learn underlying technology and how stuff works "this is the way 🤠", imho.

I have to say that this path isn't easy as others pointed out and I recommend starting with the basics. You might end up with a lot of unfinished libraries or engines, but don't give up. Ultimately, you'll benefit from all of them. Don't ask me how I know šŸ˜…

1

u/No-Dentist-1645 Sep 25 '26

Good luck! It's definitely possible and even a good learning experience, it's just that you're gonna have to reinvent a lot of wheels in the process, and real "production" projects outside of hobby projects don't see much reason to do that, which is why game engines are a thing to begin with

14

u/tibithegreat Sep 25 '26

C++ is good for complex games as well, you just have to use a mature engine, like Unreal or join a company that has a proprietary engine (most of them are C++ as well).

2

u/No-Dentist-1645 Sep 25 '26

True, I just don't know much about Unreal to vouch for that, and sometimes game development using large engines like Unity and such tend to add a lot of abstractions on top of the programming language itself where I would consider it their own variant or "dialect"

3

u/tibithegreat Sep 25 '26

I understand and what you are saying, and in some way it is indeed true.
However I worked with both Unreal and a proprietary engine of a big company which I will not name (rhymes with boobysoft), and most of the peculiar things were usually around added preprocessors to be able to handle reflection and data serialization. Other than that it's usually just plain old baisc C++, when writting code you are mostly just thinking about c++.
There are obvious custom implementation for a lot of low-level stuff (but that's generally the case for most big companies), but in the end you still have to deal with pointers and making sure you don't leave them out to dangle :).

4

u/pjmlp Sep 26 '26

Which are written in C++ for the most part.

3

u/serviscope_minor Sep 29 '26

>They tried to use C++ in the kernel before, realized it wasn't that good of a fit, and moved on. Nothing to be sad or hold grudges about that.

I don't think that quite covers it really.

They did try C++, specifically g++ in something like 1996?. The problem from what I recall was it was kinda slow: gcc wasn't great back then and the g++ burned a register needlessly which was a colossal penalty on x86 which has so few GPRs. As a result, changing the kernel to the common subset of C and pre standard C++ and recompiling was not a great experience.

And the advantages of C++ were also fewer: the gcc optimizer was also not good at the whole zero cost abstraction thing that we've taken for granted since about 2005: while now we can have a stack of templated inner classes calling methods within methods within methods, and the optimizer will flatten them out to really good code, that was not the case reliably before (I recall it got quite good with gcc 3.3 and really good with 4.x).

So it's not that C++ was not a good fit per-se, it is that GCC specifically in 1996 was a bit weak optimization wise. This is feel is quite different. I can't think of anything that C does better than C++ (except in some, increasingly rare cases, exist) when it comes to low level programming. I've never written a kernel, but I've spent plenty of time of micro controllers too small to have one.

Then later, Torvalds went on a famous but rather irrational rant about C++ which also encouraged a lot of people who really wanted to be angry about something.

1

u/YoureNotEvenWrong Sep 25 '26

It's also not fashionable though. Ask anyone that doesn't know C++ or Rust what they want and they'll pick Rust

13

u/Aprelius Sep 25 '26

C++ is one of the most used programming languages in the world. It can compile and run on almost anything. I use it every day in game dev.

C++ is a tool. It solves a problem. Are there different tools that solve that same problem: yes, Rust and C are both great alternatives.

Stop caring what other people say about their favorite tool for the job they do.

5

u/pjmlp Sep 26 '26

On top of that, the industry C compilers are written in C++ nowadays, and the Rust reference compiler is not yet fully bootstraped, also depends on C++ for its implementation.

2

u/serviscope_minor Sep 29 '26

I wouldn't really say C is a great alternative: the common subset of C and C++ is so close to C, that for just about all practical purposes C is a subset of C++.

At that point it's "missing features is a great alternative to having them", which I don't really hold with. There's literally no advantage to not having references and type safe equivalents to macros for example.

8

u/AshKetchupppp Sep 25 '26

Ignore what other people think, if you like it then use it, if you're not being paid to write it then enjoy your programming hobby! There's good reasons why other languages are preferred to C++, memory (mis)management is why languages like Rust have come about. I love C++ also but encounter pitfalls I wouldn't run into in other languages

4

u/FckXFckMusk Sep 25 '26

One can do silly things with rust too...

I would have preferred if they made C++ safer, compilers more helpful et al.

3

u/ilPlayerdiGD Sep 25 '26

But at least don't insult it. Look on YT! There is a whole video of 2 hours that yaps about "C++ is the worse programming language" like bro calm down!

1

u/FckXFckMusk Sep 25 '26

Its marketing.... Paid influencers paid to say things...

4

u/segv Sep 25 '26

If it was the same video i am thinking of, it felt more like a senior developer venting their frustrations rather than marketing

Edit: Found the video: https://www.youtube.com/watch?v=7fGB-hjc2Gc

0

u/FckXFckMusk Sep 25 '26

Do a history check on the guy and see who he is affilated with...

even the IT world has its Influencers.

1

u/no-sig-available Sep 25 '26

Nobody makes videos about "Everything is fine!".

1

u/ilPlayerdiGD Sep 25 '26

Ok! ā¤ļø

6

u/Thesorus Sep 25 '26

it's not hated.

It's just not the shiny new language

it's just that there is a lot of existing software using old(ish) C++ that needs maintaining and that it sucks that is nearly impossible to upgrade to better language features.

Linus is also a dick (rightfully) in what he wants to do with the linux kernel and what language he wants people to use.

6

u/wyrn Sep 25 '26

Linus is also a dick (rightfully) in what he wants to do with the linux kernel and what language he wants people to use.

Linus also ended up having to implement an ad-hoc, bug-ridden, slow implementation of half of C++ because "pure" C just doesn't cut it -- it's more a stupid bias and project management failure on his part.

6

u/CreativeAlbatross319 Sep 25 '26

Linus is just a normal C dinosaur. I have seen so many such kind of people in my circle. The problem is they either adapt or get fired and they end up writing C with classes.

0

u/ilPlayerdiGD Sep 25 '26

Ok!

6

u/no-sig-available Sep 25 '26

Linus saw some bad C++ code in 1992, and decided that C++ - and all C++ developers - will suck, forever.

https://www.reddit.com/r/learnprogramming/comments/1dss1jo/linus_torvalds_on_c/

Therefore, we have not donated any C++ code to the Linux kernel since. Instead it features "Object Oriented C", which apparently is fine.

https://lwn.net/Articles/444910/

3

u/t_hunger Sep 26 '26

Well, Linus uses C++ for some of his user-space work. He also has no trouble with rust in the kernel. He was just very plain in stating his no C++ rule for the kernel because we were very obnoxious with our "convert your C project to C++" campaigns back then. Its funny how things repeat -- and how many people I know nagged projects to switch to C++ when they were young are now pissed at young people asking them to rewrite their projects in rust.

And there have been quite a few attempts to get C++ into the kernel since then. They usually do not get much media coverage before fizzling out again.

5

u/pjmlp Sep 26 '26

Meanwhile OS X has replaced NeXTSTEP Objective-C drivers with C++ drivers back in the 2000, which naturally run in kernel space.

Symbian and BeOS were written in C++.

Windows has had C++ in kernel space since Windows Vista, as kernel mode was added to Visual C++, and eventually the WIL template framework came to be, originally designed for drivers, naturally also running on kernel space for the most part.

Genode OS is also written in C++.

Hyper-V, a type 1 hypervisor, which are basically the revenge of microkernels, virtualizing OSes and serverless language runtimes on top, is written in C++.

Linus hate on C++ is nonsense, especially after they adopted Rust, where most of his complaints against C++ are equally valid.

2

u/t_hunger Sep 26 '26

Yes. If we had not been so annoying with our "rewrite your C project in C++" campaigning back in the day, we might have ended up with the Linux kernel being mostly C++ today. But we were super annoying as a community back in the late 1990s. I blame the strength of his reaction back then mostly to being super annoyed with us repeatedly nagging him to switch and ignoring his responses till it escalated.

2

u/pjmlp Sep 26 '26

Well, the whole Rewrite whatever in Rust seems to be going rather well, including the Linux kernel, which was originally started by Microsoft and Google employees.

30

u/jwezorek Sep 25 '26

C++ haters are just really loud online.

4

u/AlwaysDoItYourself Oct 08 '26

According to JetBrains, there are 13 million C++ developers in the world. Just quiet professionals; no drama, no useless noise, no preaching their preferred language. Our voices are heard in quiet rooms full of true pros, not in noisy, AI-garbage-filled rooms of young and dumb wouldbe-geniuses loudly proclaiming the death of C++ because their <insert-language-name> is faster than C++, more memory-safe, and it also rubs their backs while they are coding (by writing prompts, unlike those stupid C++ dynosaurs who still code using their brains, duh!..).

4

u/Tamsta-273C Sep 25 '26

Never ever i saw a man who really hate it, frustrated - yes, mad because miss semicolon - also yes, to the Hades all the linking - call me in.

But i never heard anyone to hate it for real.

Look up Java boys if you wish to learn what true hatred is.

3

u/ilPlayerdiGD Sep 25 '26

Ok! I will check out (for real). I'm curios šŸ˜‚

5

u/KAMEHAMEHAMEHAAAA Sep 26 '26

The hate for a language is proportional to the number of languages created with intent to replace the said language.

It is a long and sad list for C++ replacements, each more ambitious the next yet none stood the test of time.

5

u/pdp10gumby Sep 26 '26

Torbaldā€˜s position is a left over and very common belief (once correct) that compiled C++ code is bulkier than equivalent C code. its been true for a long time that C++ code can actually be more efficient than C code because C++ is more expressive, but it’s true that it’s easy to casually do something that will make the code bulkier.

As for the general case: most C++ complaints boil down to ā€œwhat have the Romans ever done for us?ā€

2

u/Technical_Introvert0 Sep 25 '26

Because it's not abstracted like Java and because it's useful

1

u/ilPlayerdiGD Sep 25 '26

AHAHA!

1

u/Technical_Introvert0 Sep 25 '26

The people that hate c/cpp the most are java devs.. because C++ is way more useful in every way

3

u/pjmlp Sep 26 '26

You know that Java is younger than C++ and based on how famous C++ GUI frameworks like OWL, VCL, MFC and PowerPlant used to be like?

Also that the famous patterns book was full of Smalltalk and C++ examples, Java was several years away to be invented.

1

u/Technical_Introvert0 Sep 26 '26

Who doesn't know Java is young.. java is like 17-20 youngers than C++ šŸ˜‚šŸ˜‚..

2

u/balefrost Sep 25 '26

C++ and Java are both fine languages that serve different purposes. When I write C++ day-to-day, there are things that I miss from Java. Likewise, if I were to work in Java, there would be things I would miss from C++.

1

u/Technical_Introvert0 Sep 25 '26

I miss nothing from Java.. at all..java just looks more confusing for no real benefits except code that ships across OSs...

3

u/balefrost Sep 25 '26

Fair enough, maybe your use case wouldn't benefit at all from Java. Like I said, the languages serve different purposes.

Things that I miss from Java:

  • Co- and contra-variant generics
  • Reflection (though it's coming to C++, and we'll be able to use it eventually)
  • Fast build times
  • No need to maintain separate header files
  • No need for forward-declaration or careful ordering of symbols in your file
  • Dynamic bytecode generation. I worked on a project where we did generate bytecode at runtime and loaded it into our own process, using a child classloader. I'm not saying that you can't do self-modifying code in C++, but it's directly supported in Java, whereas it would require implementation-specific support in C++.
  • C++ smart pointers have really solved a lot of memory management issues, but you do still have to worry about lifetime issues. GC in Java lets you mostly ignore memory issues.

4

u/segv Sep 25 '26

Don't forget about decent package management, being able to easily find & use libraries for even super niche things (parsing excel/xlsx/xssf files by hand is not fun, ask me how i know), being able to quickly get a prototype out of the door that can grow into a full fledged production application (looking at you, spring boot), or just language features like immutable records, pattern matching or built-in first-class green(virtual) threads. I know it goes contrary to the narrative, but there's plenty of stuff it has going for it.

0

u/ilPlayerdiGD Sep 25 '26

C++ is like the programming language that can do anything! Game, language, servers… Am I right?

1

u/Technical_Introvert0 Sep 25 '26

Yes.. C++ is C but with the same high level features Java has except garbage collection.. basically C++ is the best of both worlds.. depending on what compiler you use , you can even have access to inline assembly inside of C++.. C too..C++ and C (90% the same thing) is what you use to make other programming languages.. Java and Python are C/C++ underneath...

You can write high level code with classes and objects in cpp but also write strictly low level code that runs below the OS layer...java and every other high level language can't do that.. no jvm runs on bare metal...

Your BIOS is C/C++ ...so is code for robotics that runs on embedded systems...

8

u/kevinossia Sep 25 '26

It’s hard and complicated. Ignore the haters.

4

u/tinrik_cgp Sep 26 '26

IMO, C++ is a great language to work alone (e.g. as a hobby). But it's a horrible language to work together with other people (e.g. in a large company).

There is too many pitfalls and ways of doing the same thing, therefore it's very hard to have a consistent style. Some people will overengineer the simplest thing just because the language allows them to.

Linters don't enforce everything. So you have to spend a lot of time creating guidelines about how to do things, and have a lot of friction about it during code review.

10

u/HxSigil Sep 25 '26

it’s also a massive, messy language with UB, insane complexity, decades of baggage, and a pretty painful ecosystem. CMake alone should tell you that much

the Linux kernel is probably the worst example here. It already has decades of C code, tooling and conventions built around C, and kernel code generally wants very explicit control over allocation, runtime behavior and failure paths. You can disable exceptions, RTTI and avoid most of the standard library, sure, but then you’re already using a heavily restricted subset of C++, so the obvious question is what you actually gain by switching.

Nobody is stopping you from using C++. If you like it, use it. But treating ā€œpeople hate my languageā€ like some personal crisis is a bit weird. It’s a programming language, not a personality trait

5

u/Ok_Independence_9841 Sep 25 '26

Those who can't write C++, hate it, and find excuses for that hate. Just like those who can't do object oriented falsely claim that OO is a bad idea while they continue to use the very same ideas themselves, often while not understanding that's what they're doing. It's just humans being human. Anything excellent and difficult will garner hatred.

5

u/amoskovsky Sep 26 '26

Several reasons, all related to Rust.

1 - memory safety of Rust.

Rustaceans believe the memory safety of Rust is enough for other languages to stop existing.

It's definitely not true for C++ as it has much more features than some safety concerns can address. And not every project needs "guaranteed" memory safety (don't get me started on the guaranteed part in Rust; spoiler: it's not).

And when C++ devs ignore them, rustaceans become aggressive and loud, which looks like many people hate C++. It's just an illusion

2 - AI

In the era of AI, big corporations hope to replace devs with AI, and based on the memory safety promises of Rust initiate migration from C++ to Rust, expect the slop code AI produces in Rust would require less efforts avoiding crashes/vulns than C++ slop. That's partially true, but since the migration can be only automatic due to huge C++ code bases - the resulting code is just a huge pile of source code that no human has ever reviewed, which is a ticking bomb of tech debt.
This process though causes massive job market effects and people now suddenly want to dev in Rust just to be in the job market trend.

And when you have to do something you start hating those who don't have to do it :)

1

u/rodrigocfd WinLamb Sep 27 '26

AI produces in Rust would require less efforts avoiding crashes/vulns than C++ slop.

Theoretically yes, but in practice we see LLMs generating lots of unsafe blocks amidst their slop rewritings. What is better is the toolchain: Cargo is much harder to fuckup than makefiles.

2

u/Able_Development2478 Sep 26 '26

Not every language is useful for everything. There are legitimate usecases like explosion of technical debt when you use C++ in a project which does not need it. C++ code can become very complex over time and that can make it very difficult for project heads, etc. to reason about it if managed poorly and they i guess do not want the headache so you often see specific features being banned from use.

There's also stuff about perception that people build over the years. If you think from how long C++ has been there and how initally the standard was so slow in adopting features (C++11) you can see why people would be upset and hold onto the negative perception. Then there's the other segment of people who feel it's progressing so fast to keep up and then people who want changes which C++ committee doesn't answer. The list goes on and on.

I'd say do not worry about why someone hates C++ as it's just a tool. I don't think you'll be super angry if someone doesn't like using a nailgun and prefers to hammer a nail in XD.

1

u/abandoned_idol Sep 30 '26

hammers in glue, splattering it everywhere

I feel so accepted.

3

u/CletusDSpuckler Sep 25 '26

It all depends on where you hang out. You think there's any love lost for Java in this sub?

3

u/Electronic_Tap_8052 Sep 25 '26

C guys like C because it can really only do things one way. There's no hidden function calls (ex deleters when things fall out of scope, operator overloading, etc). Like assembly, what you see is what you get.

But at the same time that's why I like C++. There are many ways to skin a cat and it lets you hide implementation details behind a clean, foolproof interface.

Can it be abused? Sure. All tools can be. But so can C. C forces you to have raw pointers which almost always leads to subtle bugs later on unless you are very diligent about memory management and and lifetimes.

1

u/serviscope_minor Sep 29 '26

>C guys like C because it can really only do things one way.

I've often heard such a claim put forward by proponents of a language they say is "simple". I really don't understand it, I will admit. In every language I've ever used there are loads of ways of doing everything. That's one of the joys of programming after all: the world is at your fingertips. See also the "zen of python". What it usually ends up meaning to me is (pithily) "if you are terminally online, then there are well known idioms for quite a few things".

2

u/Resident_Educator251 Sep 25 '26

There are only two kinds of languages, the ones people talk about, and the ones people don't use.

2

u/cfeck_kde Sep 25 '26

If you really want to know why people hate C++, you shouldn't ask in a C++ forum.

2

u/TheRavagerSw Sep 26 '26

People write posts like that never actually worked on a C++ project

2

u/gfoyle76 Sep 25 '26

it's not hated, you are in the wrong company

1

u/CheesecakeTop2015 Oct 01 '26

can I use C++ for fun in peace?

Of course.
Don't waste time worrying about people who don't agree with you, know your arguments, be curious about their arguments, draw your (temporary) conclusions that work for you and accept there are many differing opinions out there, some more informed/valuable than others.

1

u/nacaclanga Oct 05 '26

C++ isn't hated. It is just widely used and extremely versatile and has plenty of overlapping areas of usability, meaning it is seriously considered in a lot of projects and thus arguments in favor or against it have to be presented frequently. And just like any other languages, it has tradeoffs so it loses sometimes.

Plenty of languages simply get discarded as serious options much faster, so nobody even bothers to spell out the arguments against them very often, which may give the illusion they are less hated. Probably Torvalds would be against writing the kernel in Ada, D, Objective C or the like as well, but we never know since nobody ever suggested that.

Kernels are a very specific uses case, that has quite peculiar priorities. Whether a language is good for that says absolutely nothing about which language would be a good choice for a game, a physics simulation, a webbrowser, a or quick and dirty utility tool.

1

u/rip_void_0 Oct 18 '26

i like c++ (i try rust but i did not like i cant just use int func(&variable)in rust you must write let and another thing !) but ask linux trovald or zig

1

u/fortsnek274 Sep 25 '26

Well, there's certainly a laundry list of grievances.

1

u/Wild_Meeting1428 Sep 26 '26

linus torwalds is using c++ himself for his private stuff. He doesnt hate it. Its the developers which are missusing c++ in a way that it may become unmaintanable or hard to review. Adding another language was not worth at the time the decision was made. Rust is accepted, because it cherrypicked the best of C++ while leaving the opiniated stuff out / took another approach. Like exception free, memory safe by design, no dynamic polimorphism via RTTI, other approach for templates and comcepts (traits and impl)....

C++ is catching up tho.

1

u/C00CKER Sep 25 '26

Some people may hate it, but there are areas that run almost exclusively on C++; e.g., high-performance computing.

It is hated mostly by people who don't really use it for anything or by people who know only some super-old legacy code.

What is somewhat true is that, due to how old it is, some design decisions are not ideal and there are many features that exist but shouldn't be used.

However, memory management in most use cases of modern C++ shouldn't really be an issue; you shouldn't manage memory manually unless you need to for some specific (performance-related) reasons.

1

u/neppo95 Sep 25 '26

Use what you want to use. In terms of companies, they (should) use what is best for their purpose. Sometimes that is C++, most of the times it simply isn’t. It’s not about hate, at least not to 99%

-1

u/Existing_Ratio_957 Sep 25 '26

C++ is god but for the industry is prefered something that is consider more "stable", the industry that i know uses c++ in majority is game industry for development purposes, but at the end it doesnt matter the language you program just do it with passion! You dont need the others like something you like.

1

u/ilPlayerdiGD Sep 25 '26

"The language it's just a tool", got it!

-1

u/Technical_Introvert0 Sep 25 '26

C++ is literally like giving someone who's never driven a vehicle a car and telling them to figure it out.. if they crash and die oh well.. if they learn how to drive from that then great ... There's 0 safeties with C++.. literally.. in other languages like Java you can't run uninitialized variables like a+b=c without specified values.. you can in C/C++ and it will give you random garbage.. in java/python you are prevented from writing the same thing twice to be used differently outside of a class or rather naming conflicts..

In C++ nope.. it will use the 1st specified value of that variable until it reaches the next specified value of something named similarly but used for a different thing.. and still compile without error codes.. to of course give you garbage outputs...

C++ is God mode.. you create with C++.. then you manage your creation with abstracted languages like Java or Python.. but you better know what you are doing otherwise you will build an app that stays in the background eating RAM despite being closed like me.. java and others make this hard..

C++ makes making a virus or malware easy whether you intended to or not.. very easy to make something that is catastrophically dangerous to a system in C++. PS, stay away from malloc until you have 6 years of experience coding in C++...

This is part of why people don't like it...they just can't understand it well because it requires an understanding of the hardware you are coding for...it's not some high level crap like Java although it can be

-1

u/AutonomousOrganism Sep 25 '26

The power of C++ brings a lot of complexity with it. As Stroustrup said "Within C++, there is a much smaller and cleaner language struggling to get out".

Another more practical issue is that the c++ standard library is not stable.

-2

u/makmanos Sep 25 '26

I am not sure "hated" is accurate. However building and maintaining production level stuff in C++ is not "cheap" or "fast" or "easy" while there are alternatives, and absolute speed is not a critical factor in what you need to build. That's as far as the "industries" in general is concerned.
Not sure about the Linux kernel though.

0

u/Powerful_Attention_6 Sep 25 '26

I too love C++ but you really need to know your stuff, because C++ has very long rope it offers to hang yourself

And the new C++ standards has become so complex that you can take an actual PhD in it

However, if you are in a position to select your favorite/good subset of C++, then that language can help enormously in writing safe code that is easy to discuss

-3

u/[deleted] Sep 25 '26

[removed] — view removed comment

2

u/khaled-Ahmed-- Sep 25 '26

If you are right, why is HFT Engines built only with C++ ? C++ is faster and better on everything.

0

u/segv Sep 25 '26

Funnily enough there's at least a couple of HFT engines built with Java ;) The juicy stuff is obviously private (they make money off it after all), but I believe Peter Lawrey had a couple of talks outlining how it is done.

(if i recall correctly they avoided allocations on the transaction processing path, which while was annoying the boost in developer velocity paid off)

1

u/KAMEHAMEHAMEHAAAA Sep 26 '26

That is because contrary to popular belief most HFT doesn’t need to be that fast.

When speed actually matters, you aren’t even reaching for C++ or being careful with allocations in hot paths written in some GC language or anything that touches the CPU, instead you are opting for FPGAs.