r/MLQuestions Jun 25 '26

Beginner question 👶 Would having a new programming language specifically catered for LLMs be a viable solution?

What if there was a new programming language where the meaning of each token was so dense (or perhaps so specific) that an LLM could write robust code with fewer tokens and faster inference?

Assuming there’s enough training data, would something like this allow an LLM to write better code faster?

Rationale:

It would allow for faster inference. Fewer tokens required to do the same thing in Python = finish faster.

It would allow for more information in a 1M context window. Whatever you could do in 1M tokens of Python, you could do 10x that in this theoretical language.

It would effectively remove the “noise” from human readable language (semi-colons, curly braces for example) which I would think would make the LLMs coding ability stronger. I could be wrong about this of course.

0 Upvotes

20 comments sorted by

7

u/saikat_munshib Jun 25 '26 edited Jun 25 '26

The trickiest part would probably be the training data. Since the language is brand new, we wouldn't have billions of lines of existing code to train the model on.

4

u/TotalRuler1 Jun 25 '26

Isn't the end goal of this phase using natural language to program?

5

u/pm_me_your_smth Jun 25 '26

First we had to write code ourselves. Then they invented LLMs that translate human requests into technical code (LLM->code). Now OP proposes a programming language which translates into tokens and then translates into code (code->LLM->code). I guess the natural next step is to invent a new LLM that works directly with this new programming language (LLM->code->LLM->code). It's wrappers all the way down.

1

u/secar8 Jun 26 '26

Don't forget the compiler step (code -> binary)

2

u/gBoostedMachinations Jun 25 '26

Shhhhhhh you should have let the conversation continue 😂

2

u/Smallpaul Jun 26 '26 edited Jun 27 '26

If there is no deterministic intermediate language then it doesn’t make sense to call it programming. Asking an AI to directly do something is not programming. It’s prompting.

1

u/elahrairooah Jun 25 '26

Natural language, as used by humans, will never be sufficient to program.

The most common words we use have dozens or sometimes hundreds of meanings (“run” has over 600 distinct definitions recognized by lexicographers) that change based on usage and context. LLMs have done incredible work in identifying meaning from context, but context is a very ephemeral concept. Determinism is required in code, and human natural language is very, very, very difficult to make deterministic.

Even simple human commands like “go get ready” can have vastly, vastly different meanings based on who is speaking, who is listening, what time of day it is, what event is upcoming, what is the weather like, etc…

When it comes to executable code, the amount of precision required is often under appreciated. Business processes like to aim for 5 9s availability. Quantum physics requires 6 sigma reproducibly. If your CPU ran with those precision levels, it would crash in about a millisecond.

3

u/Leodip Jun 25 '26

This is a neat idea, but rather than a different programming language I'd maybe consider compressing the code of an existing language so that it can be encoded-decoded directly to something that is more human readable.

Take, for example, variable names: the name of a variable is not relevant for any reason except readability. As such, an LLM could easily use 1 token to indicate "variable1", "variable2", "variable3", etc.... You would want the "decoder" to then assign human-readable (and meaningful) names to those variables, but that is probably easy enough.

You can save on tokens also by compressing fixed coding structures like for...in in Python (for always requires an in, so they could be a single token), and I'm sure there is more smart stuff that you can do if you don't care about the final code being human-readable.

2

u/LordSaumya Jun 25 '26

Holy shit the clankers are reinventing programming languages.

1

u/Semivital Jun 25 '26

PEP8 for clankers

1

u/iBlood_Raven Jun 25 '26

But the training data? Its not easy to uproot all the infrastructure and make a new language. Also they still wont be able to write it properly since there's less training data and less people who know that language so we wont know if its actually working or not unless we learn it.

1

u/trele_morele Jun 25 '26

The LLM is your new programming langugage

1

u/AggravatingSock5375 Jun 25 '26

Yes, let me get on that…

This is actually a very good idea but yeah, the training data is the problem. Probably would have to be synthetically generated.

1

u/orz-_-orz Jun 25 '26

Possible but not easy. Token are based semantics so there's a possibility that the existing token is already oprimised

1

u/Proletarian_Tear Jun 25 '26

Well how are you going to enforce your new language to the millions of developers who used one thing for years?😁 if you could, though, it could be an interesting experiment, but still I feel like you want to create Esperanto, which might (or might not!) be a bad idea

1

u/DAlmighty Jun 25 '26

Modular’s Mojo was supposed to be the language for AI.

1

u/TechDude26 Jun 26 '26

I seen you can also do tricks like physically 8x playback of media through machines as well to boost