Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question

closed as too broad by gnat, GlenH7, MichaelT, Dan Pichelman, mattnz Aug 25 '13 at 8:56

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
You do realize that every language since Assembly, C, and C++ have tried to make it as conversational as possible? I'd say the only thing that would come close is ASP.NET since there are no brackets *shutters –  TheLQ Sep 5 '10 at 23:02
    
@TheLQ: In a conversation you'd describe everything on a general level then go more specific –  Casebash Sep 6 '10 at 0:13
11  
Even if you could, could you imagine the conversations... User: "Computer, sort this list using bogosort". Computer: "<mutter>Here I am, brain the size of a planet, and he asks me to use bogosort...</mutter>". User: "What's wrong with bogosort?". Computer: "I'd make a suggestion, but you wouldn't listen...". Then again tech support might be fun, you could try to talk manically depressed computers out of electronic suicide. –  Joe D Sep 17 '10 at 18:22
4  
Person: "Erm yeah, i want this program to.. umm.. not sure how to say this.. you know what i mean, right?" Computer: "wtf?" –  Bojan Kogoj Sep 5 '11 at 17:36
3  
It sounds strangely like the conversation between a product manager and a developer –  Kevin Sep 5 '11 at 20:49
show 1 more comment

4 Answers

up vote 9 down vote accepted

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.

share|improve this answer
4  
Humans don't know what they want. +1 –  Moshe Sep 6 '10 at 1:26
7  
@Moshe: No, they know exactly what they want, it just happens to be almost entirely unlike what they need. –  Joe D Nov 1 '10 at 21:17
    
@Joe D - True, true. –  Moshe Nov 1 '10 at 21:23
    
This happened to a friend of mine all the time (and myself too). "Dammit!" "What?" "The computer did exactly what I said" –  jsternberg Aug 16 '11 at 17:16
add comment

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)?
share|improve this answer
    
Good points. This is most certainly, not an easy task –  Casebash Sep 6 '10 at 0:14
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.