5 ms·
Syntax-free programming
- bdfh42 18y agoAn interesting idea but - there is almost always a better user interface than English (or any other language used for inter-human communication). 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".
- jacobolus 18y ago> 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. 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.
- jballanc 18y agoI wonder if the authors have tried programming with AppleScript? John Gruber has a good article exploring the problem with "English-like" programming (http://daringfireball.net/2005/09/englishlikeness_monster http://daringfireball.net/2005/09/englishlikeness_monster).
- jacobolus 18y agoYes. 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.
- apinstein 18y agoI used to do a lot of AppleScript programming. When I initially learned about the "natural" syntax I though "this is gonna be so easy!" But ultimately it works against you. 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.
- chaostheory 18y agonot completely related but isn't the lack of rigidity/strictness the reason for all the problems related to HTML today? To me this will open another pandora's box of long term headaches
- lhorie 18y agoI thought the problem was that XML was too rigid and often blows up on the user's face. For different problems, use different tools, I guess.
- david927 18y ago"Syntax-Free Programming" is as much an oxymoron as "Language-less language". It may be graphical; it may be less rigid (what they're talking about here), but it's there. I would recommend that they look into Simonyi's work on Intentional Programming. 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.
- gruseom 18y agoI would recommend that they look into Simonyi's work on Intentional Programming. Has anything usable come out of that?
- mdasen 18y agoPlease 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.
- khafra 18y agoWhat about a web of associations--like a tag cloud on steroids--for each word and grammar construct that act like priors in a bayesian process that modifies the meaning of each atom based on context? It probably wouldn't be more than a few orders of magnitude harder than making a translate.google.com that's as good as the average bilingual.
- jrp 18y ago>> translate.google.com that's as good as the average bilingual So, a few orders of magnitude harder than sci-fi?
- scott_s 18y agoGreg Little's homepage has links to two papers and his Master's thesis which provides the actual technical information: http://glittle.org/ http://glittle.org/ 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."
- ramchip 18y agoSyntax is usually not much of a worry to me, compared to other problems (how will I lock this object for access from other threads? what should be the interface for such and such callback?) It doesn't take long after starting to program in a language for syntax to become second nature, and often it can express something more concisely, or even elegantly than plain english (point-free haskell is an art... when it's not overdone, anyway). Being able to find commands in the API is nice, but that's basically intellisense or hyperspec made automatic.