r/ChatGPTCoding • u/ShoddySherbert8502 • 22d ago
Discussion Programming languages for AI
All programming languages were created by people, for people. The goal was basically to give us a language that accounts for the limits of the human brain and minimizes bugs and errors (sure, there were exceptions, like C++). As a result, we often got poor performance and huge numbers of servers doing simple tasks.
But in this new era, we don’t need human brains to write code. So do we need new programming languages now? Or which existing languages work best for AI agents?
3
Upvotes
10
u/gibblesnbits160 22d ago
The best languages for ai right now are the ones it has the most training data on. A new language would start from scratch so first all the data we have now would need to be converted to the new language which can then be used for training.
Not worth it to save a few mb of hard drive space or slightly more efficient processing, that is never the bottleneck.
5
u/zitoliv 22d ago
Data says it's less about language design and more about training data: on Multi-SWE-bench agents fix Python and Java issues best, TS/JS worst (paper). Rust punches above its data size tho… probably the strict compiler giving the agent a feedback loop.
7
u/smoke-bubble 22d ago
Make an experiment. Let it write a project in a language or technology you don't know and share your experience with us. Then you'll see whether what you are talking about even makes any sense.
3
u/returnFutureVoid 21d ago
I asked Claude about this very idea and it said that the training data that the models are built on are what makes AI “smart”. It wouldn’t know what to do with a new language built for AI. It goes against the very idea of what a models job is. I then asked it if it had to build a project and had the choice of stack what would it use and it chose React with Node because that’s what it’s trained on the most.
1
u/VRStocks31 22d ago
I believe the ultimate programming language for AI is to "guess" the machine code of the program, and then making adjustments. So basically no programming but inferring the program itself, making it appear from 0 just like magic. Imagine an empty capsule machine. You close it, provide with the idea to the AI, you open the door and there is it: your creation.
Just like the AI now "guesses" a poem token by token, it will "guess" the actual machine code of the program skipping any programming and compiling phase whatsoever.
1
u/kcmike 21d ago
This is like a stenographer in a court room.
1
u/[deleted] 21d ago
This gets asked a lot. I don't think so. LLMs work best when they have a lot of training data. We have millions, if not billions, of lines of C++ code written over decades. You could write a new language now, but I'll bet that LLMs will produce better results with established languages.
1
u/MostlyHelpfulLinks 21d ago
Typed languages like TypeScript or Go hold up best for agents, since compiler errors give the model concrete feedback to fix on each pass.
1
u/ghia1980 21d ago
My intuitition proved by some experience- functional style works better, ai writes less buggy code. So combination of language on which ai is trained with FP works well, typescript being an obvious choice.
1
u/Ok-Experience9462 18d ago
The answer depends on what you want to prioritize.
1. Generating correct code with as few mistakes as possible
Widely used programming languages, such as Python, are strong candidates.
2. Reducing token consumption
My research suggests that languages capable of expressing more meaning with less code can be effective.
3. Reducing the time from prompt to execution
One possible approach is to generate executable files, such as .exe files, directly. This would eliminate the step of compiling generated source code.
However, executable files can be larger than their source code, and depending on how the output is represented, generating them may consume more tokens. The model would also need to learn a wide range of technical details, including CPU instruction sets, executable file formats, and OS-specific behavior, which would likely make training more challenging. Even so, this is feasible in principle.
1
u/ColdDelicious1735 22d ago
Yes it will be called slop...
But seriously this has talked of by many https://www.mrphilgames.com/blog/building-a-programming-language-for-ai-to-write
1
u/CrimsonBolt33 22d ago
I am actually creating an LLM first programming language now...been working on it for a few months. Close to releasing version 1.0
0
u/ipreuss 22d ago
It’s an interesting question. ChatGPT had a very long, detailed answer for me. ☺️
0
u/[deleted] 22d ago
[deleted] — view deleted comment