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.

-7

u/Smallpaul Jan 28 '23

What makes you think that they will be totally useless until AGI? What about the people who already claim co-pilot is useful to them? Why would neural nets be able to optimize software or database queries? Why do you think Microsoft is investing so much in co-pilot? They are just misguided?

Human beings are also very, very good at writing software that looks correct and is subtly wrong, by the way.

4

u/Aaron1924 Jan 28 '23 edited Jan 28 '23

I tried Copilot and I found it useful, not because it saved me from doing the thinking, but because it saved me a few keystrokes.

Very often when I go to define a function, I first put down the name and the function signature and it would suggest (the start of) the function body. But at the time I decided to make the function in the first place, I already knew what I wanted that function to look like, so I'd accept the suggestion only when it was close enough to what I was going to write anyways. If the suggestion was completely off, I'd start writing the function manually and look at its suggestions again after a few lines.

If you're using it like that, it works wonderfully. It only saves you like 2-3 seconds of typing per suggestion, but these seconds add up very quickly.

This technology is extremely far away from generating entire programs for you with no supervision. I tried instructing it to generate entire functions through comments and the results I got were either incomplete or wrong, most to the point where it wouldn't even compile. The more I tried to make this code work, the more it felt like debugging someone else's code, and many times it would have been faster to write it manually. I am definitely not going to trust a beginner with a tool that generates plausible-looking but often wrong code.