Actually what I am talking about is a compiler with a grammar that reads easily and the ability to create grammars and protocols easily as an important feature. The natural language example was meant to counter the notion that natural language grammars are verbose, but let's take it forward some more as you kindly put some time into responding.
Right now, to do that sort of thing, you would need to create an object model that represents people and their health constraints, you will need to supply it with data/instances, and you will still need to say something like "get healthy food for Bob" or "get healthy food for Jill", or in current languages:var jeffJeffries:Person = new Person("Jeff", "Jeffries");shop.buy(FoodConsultant.getHealthyFoodList(jeffJeffries));Or something like that.
Agreed.
So just by following the simple rules that, objects are nouns, methods are verbs and attributes are adjectives, healthy is just an adjective that describes the noun food. Sure the domain knowledge of what that means is ambiguous, but what do people do? They don't compute "THE ANSWER" computationally, they take a guess and are often wrong.
But what might they do to improve that guess? They might look for the "healthy" label. Or they might want to get an expert's opinion. They might look up what is "healthy". And what tool might they use for this? The Internet!
One day, AI programming will be a reality. I think that the sci-fi writers have it correct when they postulate that AI will first occur in compilers, because programmers have a long history of bootstrapping and we continue to delegate more and more work to the machine. In that future time, compilers may be intelligent agents trained to understand the context of a programmer's thinking. One of the reasons this has not happened yet is hardware. Context-sensitive grammars are exceedingly inefficient to parse.
AI programming is a reality and it works well for programs with well documented domains. People just expect too much from it. They want computers to figure out ambiguity that humans can't figure out themselves.
The key at this point is to link together small domains into larger domains via well understood grammars and taxonomys to help this guess.
Now say this guess was to take place, not at compile time, but at execution time and say you had a large repository of domain knowledge available via the internet on food via a web service And say that your program had some state information already available on the client's health from the subject's visits to the doctor.
Sounds like a decent place for agents with distributed constraint satisfaction acting on behalf of the user, doesn't it? Sounds like the kind of programs we should be writing these days. Ones that interface people to the internet in realtime.
Another reason is ambiguity. Humans spend a lot of time during a conversation clarifying what was just said "Oh, you mean he never knew or he just forgot?". Do What I Mean would be a lot like this, with the compiler asking questions for clarification when something ambiguous is said. Do you want to begin constructing the inference rules and knowledge base for a compiler that can ask appropriate questions based on the context of the programmer's actions? Suddenly sounds a bit more complex eh?!
Ding ding ding! I agree that this is exactly what we should be doing, but the answer of whether it's difficult or not in my opinion is that it's not. Especially if the language that you are using supports simple natural grammars, and protocols and unification like my original post suggested.
Because it's not the programmers actions that we are specifying it's responses to the user's actions. And what makes this complexity solvable is the use of simple natural grammers that interface to the domain knowledge of the internet. When you get into question response scenarios. You get simple protocols.
But forget the compiler, compilers compute, users communicate. And they communicate through grammars and protocols. Also grammars and protocols are good for network communication. It's a natural match, If we have a language that supports grammars and protocols as a focus, it will be the right kind of language for today's space.
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
