6

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?

6
  • 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, 2010 at 23:02
  • 13
    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, 2010 at 18:22
  • 1
    Well, it's possible to write a program as a Shakespearean dialog. The sky's the limit.
    – mipadi
    Sep 20, 2010 at 16:45
  • 5
    Person: "Erm yeah, i want this program to.. umm.. not sure how to say this.. you know what i mean, right?" Computer: "wtf?" Sep 5, 2011 at 17:36
  • 3
    It sounds strangely like the conversation between a product manager and a developer
    – Kevin
    Sep 5, 2011 at 20:49

4 Answers 4

10

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.

4
  • 4
    Humans don't know what they want. +1
    – Moshe
    Sep 6, 2010 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, 2010 at 21:17
  • @Joe D - True, true.
    – Moshe
    Nov 1, 2010 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, 2011 at 17:16
4

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)?
1
  • Good points. This is most certainly, not an easy task
    – Casebash
    Sep 6, 2010 at 0:14
1

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.

0

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.

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