Cort I totally agree that modern languages are still a long way from ideal. But what you are talking about is a compiler with a knowledge base of context so that it can cross the bridge from "Do What I Say" to "Do What I Mean". These are two very different things.
What you are really talking about is not just a "natural language" style of prog lang, but AI. To highlight this, what does "get healthy food" mean? It relies on the state of thousands of different variables. For one, who is the food for? Are they diabetic? Do they have a heart condition? Are they on an Atkins Diet (god forbid!)?
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.
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. 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?!
But I'm sure we'll eventually get there. Whether or not the compiler is "conscious" or not then is a matter for the philosophers.
Perhaps AI will come from left field and the internet will become self-aware (hey, we can imagine right?!) -- then Google may finally break into the compiler market ;-)
But one thing won't change: we will still spend most of our days arguing with compilers ;-)
Cheers,
Jules
On 11/2/05, Till Schneidereit <[EMAIL PROTECTED]> wrote:
I have to admit that you've got some valid points, but still, I think that there are some reasons for leaving the style of imperative programming mostly as it is:
- At least I type way slower than I talk, which makes formulating whole sentences quite ineffective in comparison to programming in Java/ C# / AS2/ Whatever in a decent environment like Eclipse or VS.net.
- For most people, it's not that easy to constantly formulate sentences that are really unamiguous and well formed. Here again, man's ability to interpolate the intended meaning from the context of the uttering comes to help in real life and will be sorely missed in programming.
There are certainly more points to make in this general direction, but seeing as I have some evening plans to attend to, I'll leave it at these and conclude with wholeheartedly agreeing that much is to be desired in most of todays computer languages when it comes to brevity and elegance.
cheers and much luck with trying to get focused ;)
till
ps: Oh, and "gotoStore" should of course have been "go(store)" or similar ;)
Cortlandt Winters wrote:
> Hi Till.
>
> Thank you.
>
> Of course I count 227 instead of 155 characters which is about 150%
> bigger and there still are things that you would need to do to cary the
> state of conditionals throughout that you aren't doing like whether or
> not Jim actually called. In fact a lot of information is getting lost in
> the translation here and none of this yet has any of the verbose type,
> import, interface, static, public, private, protected nonsense that I
> was speaking of which makes me roll my eyes at Java and as2.
>
> Every time you concatenated a set of tokens into a function call like
> "go to store" becomming gotoStore you illustrate the power of grammars
> over functions and reinforce my point. Are you going to have 40
> functions to cover every destination parameter "store" and relationtype
> "to"?
>
> It's not talking to the computer or making it seem like you don't need
> to learn a new language, it is using the inherant power of grammar over
> other constructs. Humans created natural languages as efficient ways of
> communicating. It's just a matter of reusing what was developed there
> and intelligently selecting various subsets that are easy enough to
> automate.
>
> Thanks for responding though. I do really need to stop talking about
> this and get back to work however. I apologise in advance if I at some
> point become better focused and stop responding to this thread.
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
