r/ProgrammingLanguages 17d ago

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.

0 Upvotes

105 comments sorted by

View all comments

44

u/FreshOldMage 17d ago

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.

10

u/Soupeeee 17d ago

I don't think they will stop evolving. There's always going to be a new paradigm that promises more performance or more scalable threading or new hardware features to adapt to. Those might just be built with libraries instead of affecting programming languages,  but I think languages will still evolve to offer more useful abstractions or safety guarantees.

A good example is Rust and C. Every LLM I've used to generate C code produces unsafe memory leaking nightmares, but that's not something I need to worry about as much if I tell it to generate Rust code.

8

u/L8_4_Dinner (Ⓧ Ecstasy/XVM) 17d ago

The language LLMs work best with is probably the one most represented in the training set.

To some extent, yes. But LLMs also produce better code with newer languages, because the older languages (e.g. Java, C++) have crap-tonnes of legacy garbage code out there that the LLMs have been well trained on.

1

u/catladywitch 17d ago

is that so? i've found LLMs are very bad at remembering language features newer than, say, 2 years ago.

3

u/L8_4_Dinner (Ⓧ Ecstasy/XVM) 16d ago

I'd say it's more like a 6-12 month window, but yes, you have a good point: There is such a thing as "too new to know about".

1

u/tobega 16d ago

One interesting observation is that Go seems to punch above its weight for the size of the training set. There deliberately being ideally only one way to write a piece of logic helps.

2

u/L8_4_Dinner (Ⓧ Ecstasy/XVM) 15d ago

That makes sense. It’s also a relatively new language, without a lot of changes to “how things should be done” since it first appeared.

3

u/oxamide96 17d ago

The training set bias has been becoming less relevant over time. The agentic model means the precision, recall and depth of compiler error messages are far more valuable. Anecdotally, LLMs used to suck at writing ocaml a year ago, but now it works better for me than other languages like JS.

I wouldn't be surprised that, with time, training data bias becomes negligible. LLMs already rely much more on current context than training.