the notification for me said something different than "beginner" :3
C++ started as "C with classes" but grew into an amalgamation of every and any feature anyone ever requested, modern C++ is one of the most bloated languages out there with dozens of ways to achieve any simple task which leads to difficult to understand code as no one can agree on what the language is supposed to look like and a lot of these features are, to be polite, half assed. Function resolution is a fucking mess of ADL, jump tables, overloads and implicit conversions which makes debugging a nightmare, especially with the horrible namespace dependant module system with unclear scoping rules and acess control and unconstrained generics.
There's a reason every big project using C++ bans almost two thirds of the language, and it's always a different two thirds
It's not just that there are dozens of ways to achieve the same thing. It's that the same syntax can mean different things so your intuitive understanding doesn't work. No function call can be trusted to not have bizarre side effects.
imo that is a separate problem, i consider languages with too many features to cause the separate problem of too many ways to do something, because you end up in the situation where you need to basically learn several different languages to be able to read any specific piece of code because you can never expect even two files in the same project to follow a consistent architecture, which is why every large c++ project has to ban most of the language and have very strict coding standards
Here's the thing - I think forward banning parts doesn't work. New standard will have one or two things that you could really use. At the same time, it feels like every single thing has obvious missing features or a major flaw that sooner or late will lead to a replacement, with new flaws.
And yet it doesn't have pattern matching 😞. It might be coming, though I don't think there are proposals for "language variants" (something like Rust enums)
C++ is an insane bastard of a language. It is not correct say C++ was designed. It wasn't. It has evolved out of the primordial soup that was "C with classes", and slowly inhaled and adopted every possible language feature under the sun, like some sort of Lovecraftian horror that copies and evolves on every contact with a different language.
Adopting C++ would have required incredibly strict and disciplined style rules to enforce that only a specific subset of features are used, and in specific ways. It would have been a significant project management overhead to constantly be ensuring that the contributors haven't footgun'd themselves or done something which negatively impacts existing code.
Meanwhile, it's very straightforward to look at C code and understand what it's doing, because it's a very simple language.
Microsoft picked C++ for the NT Kernel, but they had a small internal team that was extremely strict about how they were going to write it.
See but that's what I love about it, whenever I get bored with a repetitive section I can switch to coding in a completely different way to achieve the same results! Plus, I get the satisfaction of knowing I'm poisoning whatever unlucky datascraper sends my code to AI training.
C++ is a general purpose programming language. Because it can do anything doesn't mean that it's a shitty language. At the end of the day, it's up to the programmer to develop a set of standards that they should adhere to when using the language.
If you have someone who is both very aware of the language and its features AND in a position to authoritatively decide how and when to use and not use those features, sure. Go for it. This is a possible, practical situation especially in larger companies and larger teams. It should ideally be done up front and have any changes to the policy very carefully evaluated which is often difficult on both counts.
If you don't have that person in that position, it can quickly turn into a CF. That's the big reason people complain about it, and it can be a real problem.
It's a somewhat unique programming language in that respect. Very few other programming languages have such a breadth of features that using them all can and often does result in an unreadable, unmaintanable mess the way it can with C++. Java and C# can get there, but even they just don't "tempt" programmers to reach those ends in the same way that C++ seems to. Additionally, since they run in a virtual machine, debugging is a different, more supportive endeavor, and the weight of that VM implies an acceptance of some level of unideal translation to raw execution units. C++ directly generates raw machine code by design which can limit debugging and also means people sometimes use it in restrictive environments where trying to shoehorn all of its more advanced features can be especially problematic.
That's usually what people are getting at. It's not necessarily a problem with the language or its breadth, but it does seem to all combine in a manner that's somewhat unique to C++ and can create unique problems as a result.
It's one thing to be general purpose, another to have so many half-baked features, with many edge cases and hidden gotchas, developed with inputs from many partied with different opinions and interests. All while simpler features and pet peeves stay underdeveloped.
Defending over-saturating of a language with features (so much so that the C++ spec is over 2,000 thousand pages long now) with "it's a general purpose language, it's supposed to have feature bloat" is a new one.
The reason why C++ is so bloated is that it has 40 years of backward compatibility they need to maintain while trying to add modern programming features, and that's not really a good thing. It's more like a necessary evil.
I love C++, but it feels like a Frankenstein language to me. All the symple syntax is reserved for C style legacy stuff, and if you want to do things the modern RAII way you need heaps of keywords and long identifiers.
E.g. insteaf of char * you should use std::unique_ptr<char>.
A language designed from the ground up with RAII in mind would avoid that.
I have worked with C++ for my entire career and on projects with hundreds of contributors. This has never been a problem. There were never any banned features.
C++ is ugly and the performance gains from allowed UB is almost never worth the extra bugs. Those points only make sense when comparing to more abstract language though, not C the King of UB.
The original kernel (IIRC even until how) is pure C. Microsoft wrote KMDF - Kernel Mode Driver Framework - with C++, but all its API are C-compatible. Use of KMDF is highly recommended for writing new kernel drivers, but not strictly required.
C footguns are way worse I do not really get why people still use it, even at embedded c++ is an alternative. You do not pay for what you do not use..
Concepts, raii, ranges, etc.. gives so much more expressive power.
c++ has lot of drawbacks, including having different compiler vendors which are not ABI compatible, name manglings, etc.. language is not perfect neither, but continiusly evolves and with static analyzers and ai review it is much harder to do stupid things unnoticed. Then we will have reflection, profiles, contracts...
C is like base minecraft. Fun, well planned out (mostly), reasonably simple.
C++ feels like one of those modpacks with 300+ mods, ten more tech trees, realistic fusion reactors and particle accelerators, several SCP-class entities, fifteen different new ores, and a DND-like character system. It's just... every single possible addition.
You're not really "supposed" to use all C++ features, just the ones you need and understand, but projects usually end up as a very difficult to parse mess and overall the utility is only marginally higher than C. And given the choice between unreadable C and unreadable C++, the C is going to be more straightforward... probably.
Edit: All that being said, I **really** wish C had a *couple* of C++ features. But everyone says that, and everyone has different opinions on what those features should be, and that's how we ended up with C++ in the first place, so I am happy to just use C and implement what I want from not-quite-scratch.
I'm not sure what the overlap between huge minecraft nerds who've played huge modpacks and people playing with C and C++ is, but this is the most oddly accurate comparison I've seen in a hot minute
As somebody who hasn't touched C or C++ since like 2005 and forgot everything I knew about them, but has put a lot of time into Minecraft, thank you your explanation helped me too.
the fact that c++ lets you overload everything is truly nuts. I learned yesterday that the reason you can put an input stream into a conditional is because the implicit conversion to bool is actually overloaded.
C++ is like the bastard child of C and Algol 68. A language that is not only full of perilous C-style Undefined Behavior, but also too complex for anyone, including its own standards committee, to understand.
Rust is a breath of fresh air by comparison. Complex, but only the necessary complexity, and almost devoid of UB.
Large performance-sensitive applications mainly, especially when you need the broader hiring pool that C++ gives you compared to Rust or have an existing codebase that you can’t justify rewriting from scratch.
Higher level abstractiins than C makes code much faster to write, easier to understand and less bug prone. (You can make vector/matrix equations look like numpy code, but with zero runtime overhead)
Easy to use typical academic third party libraries which tend to be written in C or Fortran without spending weeks of making Rust wrappers over then.
C++ let's you do what you fucking want, i.e. write to any arbitrary region of memory. Some times you have ti implement an algorithm with a complex data access pattern. From a high level analysis you can reduce that e.g. different threads won't share data, but ti create a memory safe abstraction for this in Rust would be a three year research project. Of course Rust let's you do the same by slamming unsafe around the entire algorithm, but then you are writing "more modern C++" anyway.
C++ strikes a nice balance between performance, development speed and memory safety. The latter has absolutely lowest priority in this field: we are not dealing with sensitive data or writing a program that sits at some infrastructure layer on every computer on the planet and are thus prone to vulnerability attacks.
I don't understand the hate/war either, they're both viable in different circumstances. Taking exclusive stances on languages/frameworks/tools doesn't make sense to me.
Also completely anecdotal to my own journey but I started with C++ and Java and things really didn't make sense to me until I took a class in assembly and C. Seeing things from that low level, what the abstractions are actually doing under the hood, completely demystified everything for me. Starting with all the abstractions and jumping into object oriented programming was not the right path for me. YMMV
According to Linus's own words, to him personally C appeals more because you can look at C code and read the assembly code behind it, because the language abstraction is more or less simple and direct there. C++ throws that out.
C++ standard library and a lot of later hacked on language features don't really mesh well together, if not being totally unfit for production in the first place. These also create a million different ways to achieve something. Copy-by-default in the standard library also means that it's really likely for non-experts to accidentally introduce expensive unnecessary copies
C++ is a totally fine language if you use your own or another standard library and only use a subset of the features, but this means that to use the language on a project you need an extensive document detailing what to do and what not
Some of these answers are okay. But I think the simplest answer is that the abstraction makes it so you dont see memory management.
Often times in embedded systems or the kernel you need to know where and when memory is being allocated. C++ hides that.
Using standard libraries can change where the memory resides between c++ versions.
If you did c++ without any standard library functionality then it works okay in those applications, but you end up essentially just writing c code and its easier just to stay in pure c.
Back in the day I used Gentoo, there is nothing I dreaded more than compiling a C++ program like Firefox and etc, C apps compiled much more quickly, but the C++ behemoths always took hours.
You know how Google is well known for starting things only to kill them not long later?
IIRC, that's because of their internal "politics" where creating a new thing gets you promoted, even if something else does that thing already (very simplified). So rather than improving existing products, they just get redone from the ground up and replaced over time.
Now imagine that with a programming language and its features, except nothing ever really gets replaced.
I think most of the hate is due to the fact that no one, not a single person knows all of it's features. You can have two senior C++ engineers write a program that will do exact same thing, with exact same efficiency, but look entirely different. And neither one of them quiet possibly be able to read the other person's code unless they learned from exact same source material to become C++ experts which of course rarely happens.
It's designed in a way that existing tons of C code could compile. That's why it's a successor of all C stuff. There is no war. Best description gave the legendary J.Carmack "C++ expects you to be an adult" (c). Linus complained on a long compile time.
C is basically standardized and slightly more convenient/readable assembly. It’s hard to write good and safe C, but the language is consistent and the semantics simple. C code reads easy, and the language is not trying to hide anything from you.
C++ tried to introduce high-level features at a time the industry didn’t understand how to design and use them. And on top of that, tried to maintain low-level performance/access. The result is a god awful language with too many horribly designed features, many depending on compiler support (which varied greatly at the time Linus wrote this), most coming with extremely subtle side effects that are very hard to even notice, let alone understand, unless you have a very good understanding of the specific code base you’re looking at.
It remained widely used in specific contexts because of its very good compatibility with regular c, generally easier to write (poorly) than c and its performance advantage over Java/python/what have you.
Things started changing in good ways about 10-15 years ago, but the inertia from such a big community is very heavy.
C++ has more complexity, so there's more type of errors. And it's more abstraction away from direct CPU equivalence, so it can make very exact optimizations hard. On top of that, there are breaking changes between C++ ABIs, whereas C stays the same. Although C is also being expanded of late.
And do consider Linux said that with very early C++, which offers little that C didn't. You'll see long C based projects start to use C++ features, such as call tables of function pointers instead of virtual inheritance, including a parent C struct within a child, etc. As a project goes on, they fix adapations to avoid C++ raised issues and help memory debugging, such as av_table struct header use in the ffmpeg project.
TLDR: C++ is bad because decades of accumulated features have turned it into a bureaucratic nightmare that happens to generate machine code.
C++ is an absolute nightmare to implement because apparently one programming language wasn't enough, so someone decided to cram an entire civilization's worth of complexity into it. You've got templates that basically turn compilation into another programming language, overload resolution that requires a legal investigation to figure out which function gets called, constructors and destructors with enough lifetime rules to make your head explode, and implicit conversions that make the compiler guess what you meant. Then you throw in exceptions, move semantics, inheritance, and decades of backward compatibility, and suddenly you're maintaining a compiler that needs a PhD, a therapist, and divine intervention just to parse some innocent-looking code. And the best part? Every new feature has to coexist with all the old ones without breaking existing programs.
As long as the clergyman is also an exorcist. And you will probably need a lot of alcohol ( or another kind of drugs if your choice) and an appropriate support group.
Which is utterly insane in its own right, since, y'know. He didn't come out and say "yoooo, dudeees, let's vibe code everything, AI actually rulez" or some shit.
A society redefining, and possibly society ending, tech is going going to have detractors.
Those who see their entire life at risk are not going to like it, those who simply get a new toy to play with, or better yet see an opportunity to not have to pay a human being for something, are going to like it.
I’d say the anti ai people are probably more normal about ai than the pro ai people I know. Just outsourcing literally all your critical thinking to an LLM is a bizarre behavior that too many people are doing. And I think it’s hard to discuss in tech spaces bc a lot of the people in tech spaces are using it a fair bit more responsibly than the average person. But the things I’ve seen people say “well chat gpt said” when the question couldn’t possibly be answered by information available to the models.
I was originally an AI hater, but now I’m a recent convert. Big caveat here: I actively watch and pay attention to what it’s doing and I actually review and correct its test cases. It’s honestly pretty incredible what you can crank out in a day by yourself when you understand what you’re doing and know what to look out for
To be fair, most moderate people have presented this viewpoint for half a decade. If you hang only in extreme spaces, both sides are not healthy about their obsession, pro or against.
Ai is being employed to drive a lot of white collar workers unemployed, and programming in general got punched first.
Imagine if a guy got fired from their developer job, then a datacenter propped up in his city, got his power bill blown into high heavens, lost his normal access to water and got their fiber cables damaged from the deployment of the new fiber lines (I don't remember the exact terms but I've heard datacenters caused fiber related issues)
It wouldn't be unreasonable for guys like that to hate AI on principle.
I was - the question is if were the others in this thread who act like the issue is justt Linus changing opinion on LLM, and not the fact Linus is traditionally acting like complete asshole for no reason again.
No, he berated people that act like LLMs are good for nothing and the actual spawn of satan. He's not wrong in implying they are not "smart" either. LLMs are powerful tools with very clear limitations (while not really being cost-effective or resource-effective, which is a very different story), but having a moderate or sane opinion is quite impossible nowadays, so you can either hang out with the AI bros that think it's the best thing since sliced bread or the weirdos that refuse to use an actual IDE because god gave them VIM or notepad or w/e.
have you read the email threads? laurent pinchart (the person linus was replying to in the last two LLM-related crashouts on the LKML) has reiterated again and again he doesn't want to altogether ban the use of LLMs, he wants the option to not have to use them and that LLM-assisted commits should have git's Assisted-by tag. (and maybe that commit messages should be human-written). not a single person linus was replying to even suggested that LLMs were good for nothing or should be outright banned from the kernel
Kinda off topic but doesn't he use some random emacs fork that even he doesn't recommend for anyone except himself? I guess people expect him to be the weirdo which is why they're shocked he "changed".
They want him to be the weirdo genius on their side of the argument. Whether it's about VCS, languages, or AI. They just want to show "See, this supposedly smart authority figure thinks the same, therefore my opinion is the correct one". I know a few of those people IRL.
AI is a tool. You can definitly submit AI created code - IF you verified it works and meets the standards. It works quite well if you know how to use it.
If you just throw whatever the AI spits out into a PR - screw you.
This is the key, he explicitly said as long as you know what it's doing (the generated code) and it meets the standard then AI is just another tool to use.
LLMs have turned the actual creation of code from an artisanal craft into an engineering problem. Just like how chemical engineers understand chemistry but aren't actually mixing by hand in beakers, but rather designing machines that manage the chemical reaction process at scale, LLM coding isn't about how to write a function, but the systems design around code as a commodity product that needs to move through several process steps before it can be delivered.
I agree. AI can get down tedious coding very easily. But it needs good prompts. And for this you do need somebody who knows what the result has to hold against.
Torvalds is able to use his actual brain and change his mind when the facts change. This is beyond the capacity of many in this sub who are still stuck in circa 2022 copilot.
True and it's totally reasonable now to adapt Rust (an not C++) as a language for kermel development but afaik Linus' rant on C++ goes way back in time (when Rust wasn't a known, popular and well-developed language).
Linus Torvalds. The same guy that invented the version control tool Git, and has the famous quote of "I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'." (With "git" being an insult in British slang.)
He's fine with it because he mostly sees the beneficial side. The kind of people working on the Linux kernel are likely to be highly skilled and specialized and use AI reasonably.
He's basically ignoring the issues that arise when the general populace use it.
Using AI helps fuel development of it and the issues that come with it. To say "it's just a tool" completely ignores that aspect.
I honestly haven't really enjoyed writing code for years now because once you've used the same language for decades the novelty kind of wears off and every project becomes some boilerplate amalgamation of the same shit you've been doing your entire career.
AI has allowed me to spend less time rewriting the same boilerplate bullshit and more time completing and refining projects, and shipping shit.
The flaw in Linus' argument is that a compiler isn't enabling people to go and inundate open source projects with complete and utter shit. The argument that they are tools and should be seen as such is fine, but having an AI policy to help mitigate the actual and real problem of pushing the "is the code good?" check all the way to the reviewer is also absolutely reasonable. I feel like he's sidestepping and not acknowledging that AI is actually killing open source projects. The Linux kernel is big enough to be largely immune to it, but most projects absolutely aren't.
It's also very different because the "tool" is doing stuff on its own, making decisions. That's very different from something like an IDE highlighting a syntax error or unused variables. It's also not deterministic.
Honestly Linus is getting less and less defensible, and less trustworthy too. "Thanks Meta!" just reeks of corporate influence. Very disappointing.
You can just not accept crappy PRs, but the spam is very understandable, lazy people wanting clout are the worst. Linus spelled it out pretty clearly - it's about people actually understanding what they are contributing. I have contributed to multiple open source projects already when I didn't think I would ever do that with bounded, reasonable changes that I confirmed myself and even made better when maintainer said "why don't we do this also?"
Sure you can just say no, but that's not the point. You're passing the burden onto actual code maintainers. Instead of needing to understand what you are pushing to make a PR that passes CI, anyone can throw anything up that can't be gated except by actual people reviewing it. That's the point, now maintainers of open source repos are responsible for doing what automated processes were previously able to do. That directly causes burnout and those projects either being closed or just completely taken over by slop.
Can AI be useful as a tool? Sure it can, but it's not the same as just a compiler. Open source communities are actively suffering because instead of maintainers having productive and interesting conversations with people who know what they are doing, they are spending more and more time opening PRs, judging that it's slop, and rejecting it.
Linus didn't just say "Linux is removing the AI policy because we can handle the volume of slop that that will bring," he went on a rant about how it's not different than a compiler or a word processor when it has a very visible and real impact that those other tools do not.
You have maintainers and the status quo was that you use the project and you contribute back by investing your time and effort into improving the project. Sure it takes some maintainer effort to to review and feedback and to maintain developer guides etc.
Now though it takes next to 0 effort to write "find a bug and fix it". "Implement this feature I've just dreamed up". "Add support for this" into an llm, get a 200, 800, 1400, 5000 line diff that touches on 8 different parts of the project, that uses assumptions that were in its broader training material and that don't align with the project standards or philosophies. That rewrite stuff pointlessly, that duplicate code.
And after that 0 effort expended it still has to be reviewed and refined but that is a significant amount of effort on behalf of maintainers whereas the contributor just bungs the feedback back into their llm.
Part of the point of the whole process was to try and get people to take ownership of the project, to feel part of it and to learn the codebase and processes.
End of the day whether it's merged or not. No one has gained anything cause the contributor didn't actually understand anything they did, they didn't learn anything. The maintainer has spent 5x longer on it than any human generated PR plus they are getting.
So what's the point of contributing to open source with an AI, end of the day could have just bunged the same prompt in themselves and been done twice as fast. Hell if cost is an issue literally donating tokens would be a better use of everyone's time.
The point is someone still has to get eyes on those crappy PRs and there is a point where "just don't accept crappy PRs" means "spend an inordinate amount of time sifting through them in the hopes that one out of every thousand is actually something worth looking at". You'd go absolutely insane sifting through the garbage because the amount of work required to submit a bogus PR has become essentially zero. Before, it required at least some understanding of programming fundamentals. Now all it requires is $20.
I am completely sympathetic to projects who are saying look, the time we actually save not having to sift through centuries of slop is actually a net benefit on productivity vs whatever we might gain from taking in AI generated PRs.
I do agree, but it's also absurd expecting responsible developers to not use it or recognize its validity as a tool.
The fact there's no policing cannot mean the only users that are responsible enough to not flood the ecosystem with crap are also the ones that shouldn't employ it.
If Linus or similar examples didn't use or promote fair and proper use of LMs, things wouldn't change much: there'd still be no policies in place, and the only contributions would be the flooding you're talking about
we do need policies, but we also need examples of healthy and professional use
I don't think anyone is trying to downplay it's usefulness as a tool. My complaint here is specifically saying that it's the exact same as every other tool (what Linus said) and that it doesn't need any special consideration. That's a reductionist take, because it's enabling a class of contributor that puts more work onto other people instead of just making an individual's workload easier.
of course. but I don't think we can expect much different anymore from Linus, he's often been "extreme" and shared thoughts strictly on how he thinks contribution should be shaped, based solely on how he contributes and expects others to. that does not mean it's how contributing should be universally
what I'm seeing is, in a way he's already spoke on "policing" in the sense of policing developers, and contributors, not the tools. it is partial, and reductionist, I completely agree, but honestly I don't expect he'll ever advocate for policing LMs themselves, because (and I can't completely disagree) as I understand it he's always been more towards raising the contribution bar for people themselves, even before LMs
I think in the ideal world Linus expects people to have the intellectual honesty to just not do things if they're not "up to them", either with LMs or not
C++ wouldn't be as annoying to use if the main priority of the standards committee didn't seem to be creating the most obtuse, unintuitive and verbose naming and usages for every single piece of the standard library.
I don't understand all the hate on C++, I've found it to be quite nice to use, really, I understand the complaints on backwards compatibility and move semantics, those are quite useless, but just because it has a large standard library that allows you to write faster code quicker doesn't mean it's a bad language. C has basically no standard library, which means you have to write everything yourself. Both have their benefits and disadvantages. Both are fine to use and work for plenty of use cases.
I used to love C++, now its under so many layers of syntax it looks like a mess. It used to take that simplicity from C which I love but that has been long gone.
The point Linus made about "believing that people are doing their best and expecting people to understand what they are doing" just goes clean over his head because "hurr c++ bad, let's do another raylib speedrun guise". Having an obtuse language that just keeps growing features on top of itself instead of refining is the same thing as technology that quite literally upended the whole field. Sure.
Once you really wrangle C++ it becomes so, so, so unbelievably easy. Why do people rag on templates when they are literally just a preprocess copy+paste? I think people think things are more complicated than they are.
Doesn't necessarily conflict. He also states people have to be understand and be responsible for what the LLM has written and he'd probably argue that this is easier in C than C++.
The point is regulation. I'm at a company where essentially 80% of the code has been written by the people who are not with the company anymore so essentially for me it's the same if it's been a human, an LLM or a monkey. Difference now is that LLMs can generate me docs, trace stuff through, find limitations and constraints instead of me trying to find the chamber of the forefathers where there might still be someone who knows about it.
The challenge is rather all the bloat, the velocity and the laziness that sets is (also for me). The forefathers left us a lot of code but it's nothing against what an unhinged LLM can produce in an hour if left unchecked.
Bro wrote the largest most popular OS (because of android + servers) in existence, let's cut him some slack when he uses AI lol. I'd imagine that after 20+ years of coding, he's just lost the passion for it.
Linus is mainly a reviewer nowadays, so if anything he'd be on the the receiving end of slop submissions
this to me speaks more to the viability of generated code than to his own burnout, since his standards for what makes it into the kernel haven't otherwise changed
I'm not so sure. With his stance on AI he's more likely letting his own agents do the reviewing. Doesn't sound like he's manually reviewing every PR and making sure it isn't slop or meets his standards.
While the rose tinted glasses view of coding is getting to solve all kinds of unique and interesting problems that you'll have to solve like a logic puzzle, the reality is that this fun stuff is only like 10% of coding, while 90% is just annoying busywork.
AI is more than capable of doing the busywork so you can do the actual fun parts of coding.
Also code review, lots and lots of code review (which you'd have to do anyways, so it's whatever).
AI is taking the best parts of programming and makes you do the worst thing in programming : reviewing code . And if you anything useful AI makes sure to drown your work in a sea of copies . Look at the whole decompilation thing , why the fuck would any indie dev would make anything when AI copies it . At least pirating you still get the name recognition, AI completely erases you and your work .
23
u/YouAreMyFire00 Oct 17 '26 edited Oct 17 '26
Im a beginner and managed to learn to understand C# and Java and now I can build simple CRUD app.
So i kinda don't get the hate/war between C and C++ here...
Anyone can explain simply what's the hate here?
1.7k
u/Prefer_Diet_Soda Oct 17 '26 •
TLDR: C++ is bad because decades of accumulated features have turned it into a bureaucratic nightmare that happens to generate machine code.
C++ is an absolute nightmare to implement because apparently one programming language wasn't enough, so someone decided to cram an entire civilization's worth of complexity into it. You've got templates that basically turn compilation into another programming language, overload resolution that requires a legal investigation to figure out which function gets called, constructors and destructors with enough lifetime rules to make your head explode, and implicit conversions that make the compiler guess what you meant. Then you throw in exceptions, move semantics, inheritance, and decades of backward compatibility, and suddenly you're maintaining a compiler that needs a PhD, a therapist, and divine intervention just to parse some innocent-looking code. And the best part? Every new feature has to coexist with all the old ones without breaking existing programs.
617
u/klaxxxon Oct 17 '26
Is it unreasonable to change an opinion when actual decades have passed?
174
u/feldomatic Oct 17 '26
tbf, C++ allows memory safety, while Rust requires it
57
u/Carbon_Cotton Oct 17 '26 edited Oct 18 '26
I mean, that is Linus - if you do something he dislikes, you are ugly stinky subhuman.
I am not saying he is that wrong with C++ - but i am 100% sure that if he was in opposite camp, he would be calling opponents of C++ "substandard".
71
u/fiercedeitysponce Oct 17 '26
My sleepy ass thought this was about Linus TechTips at first
26
u/[deleted] Oct 17 '26
As a prolific user of C++ I completely agree.
17
u/Direct_Chemistry_179 Oct 17 '26
Absolute Bajoding
127
u/apt-maintenance Oct 17 '26
still correct, btw
41
u/Plushkle Oct 17 '26
AI does the easy job and helps senior devs that know what they are doing. The dude is a super specialist senior, so AI kinda helps him
40
u/dannuic Oct 18 '26
The flaw in Linus' argument is that a compiler isn't enabling people to go and inundate open source projects with complete and utter shit. The argument that they are tools and should be seen as such is fine, but having an AI policy to help mitigate the actual and real problem of pushing the "is the code good?" check all the way to the reviewer is also absolutely reasonable. I feel like he's sidestepping and not acknowledging that AI is actually killing open source projects. The Linux kernel is big enough to be largely immune to it, but most projects absolutely aren't.
27
u/nimrag_is_coming Oct 17 '26
C++ wouldn't be as annoying to use if the main priority of the standards committee didn't seem to be creating the most obtuse, unintuitive and verbose naming and usages for every single piece of the standard library.
4
u/Garland_Key Oct 18 '26
Reddit is cooked. I can't tell if you're all clankers or just sub-par and boring.
1
u/EuenovAyabayya Oct 18 '26
*decried
4
u/ooqq Oct 17 '26
4
u/Oz-Batty Oct 18 '26
If you want to learn more about the problems with C++ start with the C++ frequently questioned answers.
2
u/EuenovAyabayya Oct 18 '26
CMS-2 will never die. /s
2
u/Oswald_Hydrabot Oct 18 '26
He was right
2
u/Free_Tomatillo463 Oct 19 '26
I don't understand all the hate on C++, I've found it to be quite nice to use, really, I understand the complaints on backwards compatibility and move semantics, those are quite useless, but just because it has a large standard library that allows you to write faster code quicker doesn't mean it's a bad language. C has basically no standard library, which means you have to write everything yourself. Both have their benefits and disadvantages. Both are fine to use and work for plenty of use cases.
3
u/Jimmy-M-420 Oct 18 '26
He was 100% right there at least
3
u/oshaboy Oct 19 '26
Hey that's not a fair comparison. They have improved a lot in the last few years and now it's much less crappy.
C++ I mean. C++20 is actually quite good.
2
u/Live_Meeting_1121 Oct 18 '26
I used to love C++, now its under so many layers of syntax it looks like a mess. It used to take that simplicity from C which I love but that has been long gone.
2
u/Different_Berry5015 Oct 18 '26
The point Linus made about "believing that people are doing their best and expecting people to understand what they are doing" just goes clean over his head because "hurr c++ bad, let's do another raylib speedrun guise". Having an obtuse language that just keeps growing features on top of itself instead of refining is the same thing as technology that quite literally upended the whole field. Sure.
2
u/FAMICOMASTER Oct 18 '26
Gotta be honest, I'd rather have C++ than LLM.
I'm a terrible C++ programmer, probably the worst there is, but I would still trust my legitimately awful C++11 over anything an LLM generates.
1
u/wbuffetsuksdik Oct 21 '26
Once you really wrangle C++ it becomes so, so, so unbelievably easy. Why do people rag on templates when they are literally just a preprocess copy+paste? I think people think things are more complicated than they are.
1
u/imagebiot Oct 24 '26
That’s how I feel about Python
1
u/rabbit_wizard Oct 18 '26
1
u/MerePotato Oct 18 '26
He's right you know
1
u/Almesii Oct 19 '26
The worst programming language of all time
This is the only video from this guy.
Made with pure hatred
1
u/ANixosUser Oct 20 '26
tsoding le goat
1
u/met0xff Oct 18 '26
Doesn't necessarily conflict. He also states people have to be understand and be responsible for what the LLM has written and he'd probably argue that this is easier in C than C++.
The point is regulation. I'm at a company where essentially 80% of the code has been written by the people who are not with the company anymore so essentially for me it's the same if it's been a human, an LLM or a monkey. Difference now is that LLMs can generate me docs, trace stuff through, find limitations and constraints instead of me trying to find the chamber of the forefathers where there might still be someone who knows about it.
The challenge is rather all the bloat, the velocity and the laziness that sets is (also for me). The forefathers left us a lot of code but it's nothing against what an unhinged LLM can produce in an hour if left unchecked.
1
u/dashingThroughSnow12 Oct 18 '26
Really tells you how toxic and bad C++ devs are, as an aggregate group, when both Rust and LLM code gets in before C++.
1
u/Mistuv Oct 18 '26
That's not the same situation at all but keep coping.
-1
u/PM-ME-UR-DARKNESS Oct 18 '26
Bro wrote the largest most popular OS (because of android + servers) in existence, let's cut him some slack when he uses AI lol. I'd imagine that after 20+ years of coding, he's just lost the passion for it.