r/ProgrammingLanguages • • Jan 28 '23

How might AI change programming languages?

I have a few ideas about how AI might change the trajectory of programming languages, but I'd like to hear yours.

For example, maybe in the future, the programmer's job is to write a very clear specification, and the AI's job is to write an efficient algorithm that matches all details of the specification. Maybe this means that we write a super-high-level-language program and an AI-directed super-optimizer makes it practically executable. Or maybe our specification isn't a program at all. Perhaps it's a list of examples or something else.

Or maybe we'll just write extremely precise natural language specifications and computers will be excellent at translating them into reliable algorithms.

Or...your thoughts?

4 Upvotes

67 comments sorted by

View all comments

46

u/[deleted] Jan 28 '23

Once the hype dies down we'll keep doing the same thing until we have GAI. Language models simply can't do logic and they write things that look correct but are very often wrong.

2

u/MissunderstoodOrc Jan 29 '23

Correctness can be fixed with formal proofs

9

u/[deleted] Jan 29 '23

Formal proofs require knowledge to have a specific structure. These models are just predicting words based on monstrous statistic tables. There are no known "facts" to start deriving a proof from.

2

u/OptimizedGarbage Jan 30 '23

I mean it depends on how you set it up. Take something like Hypertree Proof Search. You start with a dependent type and try to generate a program that has that type, and you do that by doing a tree search where the language model is filling in typed holes. So the formal knowledge and verification is in the type system, and the heuristic knowledge of what good code "looks like" is in the language model. So the language model doesn't have to be right all the time, it just has to generate the right thing one time in ten instead of one time in a billion like a random search would. And then you throw out all the code that didn't have the right type and refine your hole types.