r/ProgrammingLanguages • u/zuzmuz • Jul 15 '26
Discussion On the future of programming language design
This is just me yapping.
I was thinking for a while about how the field of "writing" software is going through a radical disruptive transformation. Like or hate it, I don't think writing software post-LLM era is gonna be the same as pre-LLM. I'm one of the guys that like to hand craft code and put a lot of attention and intention to the coding style. But, realistically, the skill of writing code by hand, while still very important, will become more and more niche (like how writing and reading assembly is important but very niche).
What's interesting to me, is that programming language design goals were always human/developer centric. Code is not only instructions given to a machine, it is in some way a set of specifications for other human developers, as well as your future self too, that explains the expected behavior of a certain piece of software. The main priorities when designing language features was improving the developer experience, that is a very subjective metric and this is why we keep arguing and debating about programming languages, but I digress.
With the switch to LLM generated code, I feel the priorities might change. There's already a lot of studies on which programming language is best for LLMs. People argue that languages with strong typing, a functional style and good error messages are best, because you can more reliably create autonomous feedback loops that would help LLMs stay on track.
In my opinion, functional programming languages are more relevant than ever, no side effects, you can generate 10K lines of code, read a small 100 lines somewhere, and be sure that it's not affecting the behavior in an unexpected way somewhere else.
The main argument against functional programming is that working with pure functions and manually threading state is an extra burden on the developer; having a mutable state is "initially" more intuitive and simpler to reason about. The other argument is performance, I tend to disagree with this general statement (purity allows for aggressive optimization and implicit parallelization).
However, everyone agrees that functional code is easier to maintain on the long run, it might make small things harder for you first, but at the end there's this payoff. When you have the capabilities of generating thousands of lines of code a day, this becomes way more relevant.
Finally, it would be interesting to witness how the rise of LLMs will affect the design of programming languages. I feel that languages that have
- simpler grammar
- expliciteness
- one way of doing things
- strict and safe semantics
are at an advantage here.
Or do you think that it will be irrelevant. There's this trend of people not looking at the code anymore, I think it's crazy. Maybe generated languages won't be important, just get better models and spend more tokens.
11
u/Jwosty Jul 15 '26 edited Jul 15 '26
Some of us have always loved strongly typed functional languages that focus on explicitness... ;)
28
u/L8_4_Dinner (Ⓧ Ecstasy/XVM) Jul 15 '26
This is not yet evident, to me. It may be true, and I do not fear it being true, but from our own experience with LLMs, they are simply not capable at this point of reliably solving problems with code. They can achieve "tests passing" quite well, but a closer look at their suggested changes is a horror show, 9 out of 10 times.
It's important to understand that LLMs are knowledgeable (near infinitely so by human standards), but not capable of even a single thought. Using them as thinking machines is a tragedy in slow motion, and I look forward to the trillions that I will make helping to clean up the messes that people are currently making with LLMs.
I do not fear the coming day when what we refer to as AI actually gains the ability to think. But I also cannot predict what it will look like when that happens.
30
u/Aeron91 Jul 15 '26
every time someone says, "llms perform better when X", i feel like usually something that's also better for humans. and all the points you made sound like that to me.
so i think programming language design will focus on basically the same things.
but i also agree that llms in their current form will push us towards stagnation / less novelty. hopefully, we aren't going to just accept that.
5
u/747101350e0972dccde2 Jul 15 '26 edited Jul 15 '26
The future of PL seems to be less novelty. The main metric determining which PLs LLMs are best at is available training corpus. Language with a lot of public code win.
If you want to innovate with a new design, you would need to write an enormous amount of code, and then train the LLMs on it for it to get adopted.
There is also less motivation for experimentation, LLMs solve tasks they were given, they will not look for different approaches to current problems, unless their users tell them to.
Edit: reading some of the explanations here, I might be pretty wrong.
3
u/nebbly Jul 15 '26
Many of my design decisions around blorp are driven by similar thoughts. My over-arching belief is that readability and trust are the important things moving forward (important in the past too, of course). If you're mainly dropping into code for review/debugging, then you need to allow strong local reasoning and the expectation that many failure cases are impossible.
44
u/FreshOldMage Jul 15 '26
Maybe programming languages will just become stagnant. The language LLMs work best with is probably the one most represented in the training set. If all programming were to be delegates to LLMs, I'd assume we'd never move beyond using what we already have.
12
u/farsightfallen Jul 15 '26
At this point, I can say it will be.
We know what good programming langauges look like, doesn't matter, we take shorcuts anyways.
Look at the AI landscape, really look, and tell me how it's worked out. It's incredible how well it parallels older software. You have these cool ideas on "what really works for AI", like TSON, or RAGs, and it just all went out the window for bigger context windows, more expensive models, better hardware.
It's so definitely going to just be a rehash of old discussions - "we don't need types because, and explicitness because the model tracks it implicitly", "no it turns out we do because they work better for explicitness, so context windows are smaller", "ah, but if it's weakly typed, it can just run that code and not worry about the overall system".
Basically replace human cognitive-load with model context, replace compiler effort from oracle or microsoft, with frontier models from Antrhopic/OpenAI (hey we trained our modles on python really well, so your specialized AI language's advantage is completely migtigated).
7
u/church-rosser Jul 15 '26
Training an LLM to do LLM things with a new LLM dedicated 'programming language' is an exercise in madness.
The best existing programming language to model this on would be a Lisp, and LLMS don't grok Lisp well at all currently and that isnt likely to change significantly any time soon.
4
u/paul_h Jul 15 '26
My experience is LLMs care less about language choice than humans do. Same is true of frameworks like React vs Vue vs vanilla JS - at least for simple apps
4
u/Ok-Watercress-9624 Jul 15 '26
Best use case (remorse free) I found for llms for programming is to pair them up with lean/dafny alikes. I don't care how big the proof/program is as long as it is correct. They work as glorified beamsearch workers for finding a path between two points.
7
u/Mega2223 Jul 15 '26
Programming languages will probably stay mostly human-centered, after all without human-written code there's nothing Anthropic can
stealtrain their models on, LLMs can only infer on lots and lots of human-made decisions1
u/Toothpick_Brody Jul 15 '26
LLMs don’t care about programming language as far as design/features/grammar/etc go. It’s all about having as much training data in a language as possible. So the best LLM language will probably be JavaScript for the foreseeable future
1
u/catladywitch Jul 15 '26
That's silly. If humans stop being a factor, programming languages will no longer be necessary, because AI-generated machine code/assembly will be unbeatably efficient.
I don't think functional programming is more difficult to reason about, not at the beginning and not at the end. It's a matter of habit, but if you've ever tried to write optimised code, you'll find functional code is often way too abstract and features way too much indirection. That's up to compiler design though, even if there's a hard limit, namely the fact lambda calculus and type systems don't translate to Von Neumann-style hardware whilst imperative programming does.
3
u/unburdened_swallow Jul 15 '26
LLMs are trained on human languages and programming languages made by humans with human made code to use as examples.
So LLM programming languages just aren’t a thing.
Go might be pretty good for AI? And of course JavaScript has the most training data.
For system level things you will be writing rust interfaces and outlines and filling in a lot of the implementation with AI plus reading it. Because rust can give more guarantees at the interface level the AI is forced to follow
1
u/Dazzling-Bench-4596 Jul 15 '26
You made some good points with functional programming, especially with one way of doing things. I’m a rubyist but in this context its a bit better to have one way so the language doesn’t get too “creative”. However, I believe I heard DHH argue that if you are going to vibecode something why not use Ruby since it’s the most readable; and he makes a good point here.
The choice still boils down to if you are siding towards the machine or you; do you want the AI to write really readable code or do you want the AI to have a couple more guardrails.
I side with the former because a well known aspect of vibe coding (whether omitted or not) is reviewing the AI’s code. Also, temporarily, I feel like AI isn’t as good with Haskell or OCaml as it is with Python.
2
u/antonation Jul 15 '26
There's a lot to unpack here. I agree with the analogy that before when programmers needed to know lower level languages like assembly (and to an extent C/C++ and the like) and now most programmers never touch memory manually at all (either by borrow checking, RC, etc.), nowadays, the abstraction goes up one layer to not needing to know what functions or what variables live where, etc. and focus on the actual intent desired, which at the moment is encoded in natural language through docs and prompts.
As for the programming language design, I can't say whether the current state and the amount of training data on existing languages means languages like Python stay forever. I feel like it is (I mean look at the internet, most communication is English at least from what I see, and as humans, we drift towards the common denominator here because it's just easier and there's lower barrier to entry).
One thing I have noticed is that formats that are not permissive (like JSON) are things LLMs mess up sometimes, like forgetting closing braces. I think languages (as they have trended toward already) will allow permissive things like trailing commas, even for the last of a sequence (e.g. in an array/set/dict literal).
2
u/dekai-onigiri Jul 16 '26
It's all matter of how reliable really LLMs are. If we ignore portability, overall all programming languages are just syntactic sugar over machine code. From a CPU perspective there is just a stream of instructions and a pool of data.
Structs, classes, types, syntax errors, enums, etc are the abstractions that we have created to make a sense of it all. If LLMS were truly good we would just skip all of that nonsense and get it to generate either machine code or some sort of bitcode. We wouldn't really have to worry about portability because it could just generate identical implementation for all the required platforms.
We don't do it because LLMs are not and will not be this. That's why we still need generated code to have all of these crutches because a human has to look and check at what has been generated. Wether it's functional, procedural or whatever else language is a moot point. The fundamental doesn't change.
2
u/EggplantExtra4946 Jul 16 '26 edited Jul 16 '26
No. It won't.
If you think that you don't understand software at all. Softwares are big piles of logic predicates, whereas LLMs on the other hand can't reason logically at all.
Even if "AI" fundamentally changed and could reason perfectly logically and produce correct softwares that don't contradict the prompt, the main problem would be that prompts still contain a ridicuously low amount of information and logic compared to in an actual software, this means that most of the logic of the final AI generated software would be infered by the AI, or selected among a few profiles (low memory usage, high speed or a tradeoff between those), algorithms or data structures for specific use cases.
A lot that logic isn't crucial, for example the choice of algorithm used in a garbage collector doesn't matter, but you still need to very precisely specify your high level buisness logic so you need to write it in some kind of programming or declarative language, maybe a specific one, for example a PEG grammar to specify the syntax of a programming language, or maybe a C-like one for specifying the semantics of the instruction set of your virtual machine, or maybe datalog or prolog for general purpose logic.
When you're at that point, why not just use existing libraries for the software components of things that already exists (standard library, data structures, memory allocator or GC, parser of textual formats, decoders of binary formats, client/server libraries for network protocols, etc...) and program generating libraries for your own buisness logic, for example a parser generator for your parser, softwares like PyPy or GraalVM for your custom VM, datalog/prolog native compilers for the high level logic?
tl;dr The crcucial point in all that is that any given software have precise buisness logic that must be correctly implemented, even an all powerful AI can't guess those intricate logic rules, it would need a specification of that logic and when you've written it down in a custom language (there is no way around that), at that point regular softwares that already exist can finish the job in one go in 2s on your laptop, you no longer need an AI.
2
u/mohrcore Jul 15 '26
With all the shitfest that's going on with AI-generated slop, it's nice to see some constructive thinking.
AI models are limited by their context windows, or at least that's how I see it as somebody who does not specialize in AI. So, I think that an an AI-friendly language would be one that can provide information that effectively helps keeping the window short or handles some aspects of programming by itself, so the model doesn't have to keep them in mind
A statically typed, expressive, memory-managed language which avoids stateful computations and has a powerful set of abstractions that describe properties of computations sounds like something that should work for an LLM. Basically Haskell. On the other hand, I imagine that relying too much on type inference might constitute a severe complication for an LLM and it's pretty much a necessary feature for such languages to be usable and it's required if they feature unnameable types.
I think that some intermediate representation of such language could hit a sweet spot. Another option is that perhaps the LLM could work back-to-back alongside the language server/compiler or whatever other system that would let it query the code it generates. Then it could work iteratively, similarly to how programmers code while getting feedback from LSPs.
2
u/theScottyJam Jul 15 '26
LLMs are here to stay, yes. But we're still in an experimental stage with them, trying to figure out how best to use them and what is too far. Right now, many people are going too far with them and it's really hurting quality, but that's part of how we learn the limits.
I don't know how long we'll continue to be able to improve LLMs, but there is a possible future where they don't improve much more, and management starts remembering that quality of code is important, not just quantity. Sometimes it's better to have 3 features that are well designed and extremely stable over 10 thrown-together features.
There's always going to be the companies that want to push features out as fast as possible - for them, a language geared more towards LLMs might make sense (if such a thing exists - I'm inclined to agree with another comment I saw, which basically says that there's not much difference between a good LLM language and a good human language). And we might also see a group of companies who are going back to writing more code by hand, making sure humans understand every detail of the code, so they can make the code as high quality as possible.
1
u/SvenViktorJonsson 29d ago
I am working on a programming language without keywords, everything is just operators, custom or standard library functions. My guiding star is not really that you should read and be able to understand at first glance. But that when you learn it it’s less writing. For instance if statements are just
<cond>? <branch>
and switch is just
<value>??
<value case> => <arm 1>
<type case> => <arm 2>
<default>
where you can capture by type or by value and more specific takes precedence.
I think information is important to preserve so that optimizers can do a better job. Like using named dimensions part of the core for instance. Then things like
sum_j(A_ij)
make register memory management clear at compile time. I even have that some operators take index like concatenation a_…i &_i b_i…
Works and tells us which dimensions to concatenate along. If you are curious I can tell you more privately!
1
u/TheRealUprightMan 8d ago
I don't think LLMs changes the equation much for the language itself as far as the points you mention. The things that make a language easier to use for a person work for the LLM in the same way. LLMs think like us. They miss semicolons just like we do!
We've spent the past 40 years making better coding tools, IDEs, and all sorts of features to make development easier. Your LLM is often stuck with patch, sed, and grep; stuff that will run on a 1970s teletype! I think the tooling is next, not a new language design.
Personally, I think Python being the de facto standard with AI is insane! They just aren't good at matching whitespace and this burns tokens correcting silly mistakes, again, mistakes that IDEs correct for humans. I think its absolutely the wrong language for a number of reasons.
The main thing that is gonna kill new languages is that no LLM has been trained on your new language. While you can train small models yourself, who will train Claude?
1
u/zyxzevn UnSeen Jul 15 '26
I see LLM-prompts as just another programming language.
It's success reveals what we miss in our default programming languages and systems.
But these AI-prompts will have some of the same problems and introduce various new problems, These problems will be more visible on the long term.
But one major problem (that most people seem to agree on), is that AI prevents learning programming. The AI automatically corrects errors by the user, which also prevents the user from learning important things. Accurate definitions and logical reasoning are required for normal programming. But the AI just fills them in by default.
1
u/sacheie Jul 15 '26 edited Jul 15 '26
In my opinion you have the overall picture backwards. LLMs are designed for (and trained on) human language, not code. Formal properties are much less important than the amount of code available to train on, and the amount of human discussion around it, comprehensive documentation, etc.. that's why they do well on mainstream, ubiquitous languages like Java or C#.
Without a holistic understanding of the language and how people actually apply it, the LLM won't be good at interpreting prompts and following your instructions, right? So I think languages designed to be "human friendly" are also best for it.
But I do agree with your point about testability and feedback loops for agentic coding.
1
u/brucejbell sard Jul 15 '26
Simpler grammar, explicitness, one way of doing things, and strict/safe semantics are advantages whether or not you are doing functional programming, and whether or not you are using an AI coder. Making the language easier to read, understand, and reason about is an improvement at every level of competence (except, as you suggest, the level of the slop coder).
If I cared about supporting slop coding, I could try to work out what kind of language design would yield better LLM support. But I don't, so I won't.
1
u/Artistic_Speech_1965 Jul 16 '26
This is an interesting take. I used to create a software thinking about different target. For instance building user interface for regular user or building an API for devs. Nowadays I am adding an additional interface for LLM users. I think one interface could be niche depending on your public
1
u/Kapendev Jul 17 '26
Explicitness, yet LLMs do love Python \0.0/ I don't really use LLMs, but I think the thing that might help them a lot is better error messages. Right now every language could have better ones imo.
1
u/Embarrassed-Crow9283 Jul 18 '26
I doubt the functional claim. If that were true, LLM would be good at Haskell.
1
u/koflerdavid Jul 19 '26
Doing a good job in this regard is also important to make an LLM perform well. O think especially literate programming might see a comeback. But an LLM can do without features that merely reduce writing effort; instead the focus should be on language features that communicate intent, both to LLMs and to static analysis tools.
Programming languages like Haskell make working with mutable state look like imperative code, for better or worse. In programming languages with strict evaluation having functions with side effects is no big deal, but there are different approaches how to make sure programmers don't shoot themselves in the foot. You need to explicitly thread state with linear or uniqueness type systems, but there it serves a very important point.
For a long time people will have to look at code, shake their head, and fix it. Therefore for the foreseeable future developer ergonomy will remain important.
1
u/Sixty5Zero2 Jul 20 '26
there was a program language designer than 90s who loathed BASIC and even said that the more complex language is the better it is.
1
u/jimdesu Jul 26 '26
I don't buy the whole "functional languages are easier to maintain", and this is what got me "solving for X" regarding how to get the obvious benefits of functional programming, but without the ptifalls (implacable and/or inflexible type-hierarchies, for example) in the design of my language (which is imperative). Overall, though, I think your general thrust is rather apt, and I think those of us who are busy building the better mousetraps (each with our own definition of "better") are likely to be increasingly marginal. The industry as a whole has plenty of languages to work with, and when a machine can REWRITE a module faster than a human can MODIFY it, all bets are off on how much if at all we're adding to the future. I think the real answer to this question is to work on programming languages for the same reason people grow roses... because we love it.
1
u/kaplotnikov Jul 15 '26
The main problem with LLMs is that they have an even more limited context than humans. While training data can be considered an LLM's long-term memory, the context window functions as its operative/working memory (which should not be confused with short-term memory limited by Miller's Law). Therefore, the key to efficiently using LLMs is partitioning reasoning about code, ensuring they do not need to process the entire codebase for a single task. High-level abstractions directly help us achieve this partitioning.
From the perspective of second-order types, function types, interfaces, and classes represent existential quantification, whereas generics represent universal quantification. Modern functional languages excel at universal quantification via generics but tend to be relatively weak on existential quantification, usually supporting it easily only through functions (which act as single-method interfaces).
I have previously shared my article on this reddit, where I discuss in detail how different abstraction levels allow for the partitioning of reasoning: https://github.com/const/const-articles/blob/main/evolution/2025/01-measuring-language-level/MeasuringAbstractionLevelOfLanguages.adoc (warning: long read).
Furthermore, many current LLM studies miss some critical pieces. Specifically, I have not seen research covering:
-4
u/CyberDainz Jul 15 '26
Future of PL: you write your own language by examples and LLM make it for you
-1
u/Ok_Ad659 Jul 15 '26
LLMs will become so fast soon (Cerebras etc.) that compile and test time become the bottleneck. Currently, Go is the fastest in the whole loop because it is easy to compile and generates fast code. Of all other languages, Fortran should be comparable if tooling catches up (working on it). Python produces too slow code so test suites run slow, and Rust and C++ compile too slow. C and JS/Typescript could also benefit much. From my experience, even a not widely used language like Fortran is well written by modern AI models, so they can transfer a lot of semantic knowledge in other syntax. So in the end it is more the semantic design and tooling (cache, build system, etc. again: Go) that will count, for fast debug loop and some level of memory-safety. Also Java/Kotlin and C# could be on the sweet spot btw.
-2
u/JCavalks Jul 15 '26
programming language design has ended. it's more token efficient to ask LLMs to write using languages already on their training sets so that they don't spend too much tokens on reasoning. there is no point in making new languages now. we are stuck with what we have today forever.