Syntax-free programming
groups.csail.mit.edu
groups.csail.mit.edu
The example in the post is a case in point - it is way simpler to just grab the little margin widget and set it where you want it. Way simpler than a conversation with the software anyway.
Imagine: "Hey computer set the edge bit erm, margin, yeah thats it, OK set the margin to two inches. Wow, that's a bit wide - maybe a bit less. Let's try one and a half inches - woops maybe I meant centimetres all along".
Depends whether the point is also to communicate with other users of the script later on. It's hard to convey "he grabbed the little margin widget" in a compact way without writing it somehow.
They refer to it there as "keyword programming." I was very skeptical when I went to their description page, but after giving a cursory look at their actual work, I'm interested. It looks like they use context in the program and heuristics as guides through the search space to come up with a good guess.
There's a lot of comments here that are - rightly - skeptical, but before saying "it can't be done," check out what they actually did. It gets use one step closer to "Computer, Earl Grey, hot."
Also, “syntax-free” is a misleading name. What they mean instead is just “flexible natural-language-like syntax”.
The problem with the natural-language approach is that (a) it is unpredictable and fickle, hard to clearly document, and often buggy, even in an implementation which has been tested for 15–20 years, and (b) it doesn’t scale well to even medium-sized projects. Anyone who can learn to write quick one-off scripts in a language like AppleScript or the one suggested here can as quickly learn to write quick one-off scripts in Python (90% of the language can be ignored and it's still useful for such tasks). But if they learn Python, as soon as that simple script grows, learning new language features will allow scaling the script up in complexity.
Computers are very precise beasts, and they need to know exactly what you want them to do. The looser the "syntax" gets, the more guesses the compiler has to make to come up with a set of precise instructions.
What I initially thought would be easy and liberating turned out to be a total PITA. AppleScript programming is horrible. Ultimately there is an underlying syntax, but it's harder to remember because it's less consistent (ie "natural"). I had to spend way too much time trying to understand what goofy "natural" grammar I had to use to get it to do what I wanted.
Even if you assume an "ideal AI," I still don't think that a natural language syntax is a good idea, since language itself has a lack of specificity that requires even an "ideal AI" to make guesses that could be logically wrong.
I prefer well-designed languages or DSLs when I program to reduce cognitive load and ensure I know exactly what's going on.
I've spent a long time on this idea and came up with something that follows an MVC pattern, so that I can have Syntax X, and you Syntax Y, and your modifications are seen as in Syntax X to me, my modifications seen as Syntax Y to you. The language is the model and the syntax (graphical, textual, etc.) is just the view/controller. (But it was kind of a nightmare: to get it to work I had to create an OS from scratch using the principles, for example.)
Again, "syntax-free programming" is a really poor choice of words for what they're working on.
Has anything usable come out of that?
I think the people that work with such a goal are heroes.
Please launch iTunes and Firefox unless Safari is installed.
That's why non-syntactic programming doesn't work. It isn't ambiguous to you because you're human and realize that both Firefox and Safari are web browsers and why would someone not want to launch iTunes if Safari was installed. However, it can be interpreted both ways without such knowledge.The problem isn't syntax. The problem is the logic computers need. We're loose with our language logic. We use modifiers that could modify a host of things that we only glean from what would be natural based on the content. Computers can't understand content in that way.
So, a few orders of magnitude harder than sci-fi?
Being able to find commands in the API is nice, but that's basically intellisense or hyperspec made automatic.
For different problems, use different tools, I guess.