I have often wondered if it would be possible to write a programming language that would work as a conversation. I would tell the computer that I want to store coordinates and it would ask what representation I would use. I would then ask to find the shortest path between points and it would ask if I want to use Djkstra's, brute force or use Floyd's? What research has been done towards producing a system like this?
closed as too broad by gnat, user53019, user40980, Dan Pichelman, mattnz Aug 25 '13 at 8:56
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
I think such a language would need an artificial intelligence in place, or at least a system that can learn.
The problem is that humans don't know what they want.
Also, even writing in classical imperative language we still make logical errors. Imagine trying telling a non-intelligent software what he has to do.
What you're describing sounds less like programming and more like using an application.
Some problems you'd have to address in such a system:
- Repeatable results. The current source-code paradigm stores a list of instructions for the computer- in your 2-sided conversation, do you only store 1 half of the conversation? If so, that's not really any different from what we have. If you store both halves of the conversation, how would you go back and change things without disrupting the whole flow of the conversation thereafter?
- Who decides what the computer can respond with- eg, what if you want to use shortest-path algorithm that hasn't been pre-coded for you to select?
- How are you going to map this conversation onto the low-level language a computer really uses (which is still a sequential list of instructions)?
Prolog comes close except for two things:
- It doesn't ask you how to store data, it just stores it.
- It won't suggest you what to do in an intelligent way.
But it does have the behavior to store facts and have rules to verify them or generate a result with it.
Intellisense/CodeAssist feature in modern IDEs come to mind as the closest thing in current software practice to your requirements... whereby you discover the capabilities of the system as you type in code. It allows you to navigate the feature-space of the development platform in real time. Its not exactly the same as you describe but comes pleasantly close enough.