r/cpp • • 21d ago

Is there any point in improving the/any language at this point ?

What's the point of spending years debating new syntax, language features, and abstractions if the majority of future C++ code might not be written by humans anyway?

0 Upvotes

25 comments sorted by

12

u/Krowken 21d ago

You think AI agents don’t make use of features, syntax and abstractions? 

3

u/guybrush-77 20d ago

My experience has been, LLMs don't care much about syntax; we humans care more about this and it's not a strong point of C++... However, I agree that high quality abstractions and features are very important - human or LLM.

1

u/nusi42 21d ago

They do but not necessarily the same as we do. To me it seems they greatly benefit from languages which allow expressing the intend in a more human language form. Being able to linting them quickly where any lint failure message allows association to the intended functionality is a bonus, too.

-5

u/seeking-health 21d ago

from my experience not as much as I do. i noticed code written by claude often avoids unnecessary abstractions, goes straight to the point and it's often hard to understand as a consequence

8

u/DistributedFox 21d ago

I've also seen the opposite where AI just adds a ton of unnecessary code to abstract things that didn't need to be abstracted. I saw a file yesterday that included a struct full of booleans to keep track of which page navigation a user was on, instead of an enum. Didn't make sense until I looked at the commit contributors.

Some people seem to think that AI can figure out the correct context in a codebase, and thus infer that the accurate implementation will be done. For others (especially those who don't know much) will assume the "good enough" code generated by AI is perfect.

3

u/arthurno1 19d ago

AI have to be baby-sitted. It often do less-optimal or strange choices, just because the relevanat part of the problem comes from some training material in an obscure language or a badly written code. Or some connection somewhere got wrong. Further, if you don't baby-sitt them, and let them get away with a mistake early on, that mistake seem to magnify later on. A bit like errors in numerical computing. A small error early on can result in a big mistake later on.

51

u/Tidemor 21d ago

Is there any point in doing anything if we're all going to die at some point?

6

u/Every-Fix-6661 21d ago

Good point

19

u/specialpatrol 21d ago

I would think even LLMs benefit from better language features.

4

u/mercere99 19d ago

That would argue for developing languages that are easy to work with for LLMs rather than for humans.

(I was going to make that sound more negative, but in thinking about it, I imagine that is something that will be done, though in parallel to human-focused languages.)

3

u/specialpatrol 19d ago

Well I might argue that there isn't a difference there because LMMs are only repeating code of the like that people have created, they're not capable of inventing their own style.

1

u/mercere99 18d ago

That's certainly fair, but it is able to apply concepts from one language to a new syntax (I mean, most of them code C++ as if they were Python, but I digress...). Certainly when I've made new languages, LLMs are good at coming up with sample programs to test them out with. But I suspect that you're correct; the core programming "ideas" it uses are all from patterns given to them by humans.

18

u/STL MSVC STL Dev 20d ago

Why not have it write assembly? Why not machine code directly?

5

u/arthurno1 19d ago

Mostly because we want humans to review the output. But they definitely can if you let them. LLMs don't use mathematics or programming language to gain understanding. They use classification and statistics, The choice of programming (or natural) language for either input or output does not seem to matter much any more.

5

u/alexeiz 19d ago

Given that this is exactly what Musk said, it's likely a bad idea.

6

u/freaxje 21d ago

The point is human review then, I guess.

9

u/snerp 21d ago

Well there’s still plenty of us not using the slop machine

3

u/smdowney WG21, Text/Unicode SG, optional<T&> 20d ago

Because better languages and the constraints they have allow better programs, even if not written by a human being.

No one is vibe coding machine code.

3

u/guybrush-77 20d ago

I very much disagree. Even if LLMs are writing 100% of your code, you still have to be able to review and understand that code (unless you are producing vibe-coded AI slop). And, obviously, having better syntax and abstractions helps. But also, LLMs benefit from many of those same things that we benefit from. If an LLM had to invent every std feature (for example) for your project, it can probably do it, but both the quantity and the quality of the output will suffer.

1

u/guybrush-77 20d ago

To expand on this a bit: the quality of the LLM output very much depends on the quality of the input and efficient use of context. Suppose you are doing some string heavy processing, but you are only allowed to use old-school C functions like strcmp, strlen, strcpy etc. An LLM can do this, probably better than most humans. But, it is a waste of tokens and a big chunk of your context might be consumed by this mundane accounting; , if you are not careful, that can degrade the overall quality of the context and even lower the overall output quality (including the quality of the more "interesting" bits of the code).
I have noticed that LLMs generally produce quite decent output when given a solid codebase, with good-quality abstractions. Conversely, they do much worse when given large, messy codebases with lots of tech debt and broken abstractions (which is not unlike humans, to be fair).

2

u/dpoggio 21d ago

Any business description, manual or hard logic written by LLMs should be readable by humans. Programming languages exist to be readable by humans. LLMs should write business logic in programs that humans can read and audit. I absolutely don’t encourage the stupidity of “languages should have more features”, on the contrary, “languages should be easy”. If LLMs write complex programs in complex languages, the average human ability to audit decrease.

3

u/13steinj 20d ago edited 20d ago

AI doomers go away please! Too many have already infested other programming / software subreddits.

Even frontier models have not gotten good scores on C++ tests that I've written. I've even been able to get Opus 5 and GPT 5.3 to invent new syntax that is not real. Not as bad as GPT 4-level, but still. C++ is notoriously difficult to parse.


These things have no true "reasoning." The philosophy of LLMs shoves "intelligence" into a data format as inefficient as human language and then produces the most likely next word after it. I forget which proof it was, but the frontier labs wrote dozen if not hundred page proofs. Afterwards, some mathematicians got it down to 6 pages. This is to say, taste, good judgement, and most forms of truly new material (well, arguably nothing is "new" but easier to say that). They merelt provide easy ability to throw shit at the wall and see what sticks.


This was when I started, and the insane syntax invention convinced me we are decades away from any of the kind of doom being described, the progress rate can change but the curve is sigmoidal and we were far, far behind the inflection point. It remains to be seen but I honestly believe we have actually hit the inflection point, or are near it, with current model architectures, because they have leaned very heavily into RLHF-frying the absolute hell out of the models now.

To put it this way: if I was in Dario or Altman's shoes, they have the wrong business model, if they believe the shit they are selling. Why sell a tool so others can make code? Have that tool create and sell all other software products instead, and beat them out of the market. It's a really weird "goose that laid the golden egg" analogy. If you own the goose, you sell the eggs. But instead you're charging everyone rent to use the goose, and (based on every leaked financial report) losing money doing so.

E: Even with

  • 100% RUM based playback recordings
  • a test log indicating it tried different screen sizes
  • full access to a browser and JS console
  • a golden version to copy from (long story)

frontier models got a basic aspect of UI design wrong not once, but twice.

1

u/RogerV 20d ago

am still interacting and viewing AI generated code, so as long as that is part of the equation there's still some benefit having programming languages oriented to human cognition

1

u/rfs 11d ago

I think he was talking about the languages evolution and new features.
For example, I think that some "modern" c++ features that make the code easier to write (by humans) is useless now, because it is easy for LLMs to write C++11 or even C++98 code, and it is still readable by humans.
For example, using 'auto' with iterators simplifies the code writing A LOT for humans, but it changes nothing for LLMs, both for reading and writing.

1

u/Hopeful-Term5891 17d ago

i guess it's for human review, imagine letting agents write huge amounts of code, C++ syntax can get pretty weird, but at least the code would still be readable to a reviewer.