"Draw a red circle" is enough to get a red circle. Basic, C++, or Javascript just aren't that closely coupled with the way we think.
The advantage of natural language over a high level programming language would appear to be analogous to that which a high level programming language has over assembly.
I think you may be conflating programming with software development. People still develop software in assembly language, but few people use it in lieu of javascript on the web.
Where is the red circle drawn? How large is it? What shade of red? How are those arbitrary values chosen, and how do I choose others?
The inherent problem with NLP is that human languages are imprecise and ambiguous. For an example of the problems with NLP, try using Wolfram Alpha. While it returns useful results for many queries, as soon as you start off the beaten path it can become an exercise in frustration as you try to figure out exactly which format of words it will accept, especially as I know the mathematica command that would accomplish the desired goal (or can look it up quickly).
Obviously Alpha isn't the end-game of NLP and improvements can be made to accept more constructions. But ultimately, you're going to have to restrict yourself to a subset of your natural language's syntax, grammar and vocabulary, and I believe that learning what that subset is is far more difficult and frustrating than just learning a programming language.
Furthermore, merely knowing a NL programming language isn't enough to be a programmer--you still need to learn how to think logically and algorithmically, which seems to be the hard part for people new to programming.
Draw a circle.
Color it red.
Make it smaller.
No, 5% bigger.
Make the radius 5 units.
Refining specifications like that seems like the holy grail of movements like aspect-oriented programming, NLP or no. Separating concerns is a really good thing.
circle = Circle(); // default origin, radius, color, etc.
circle.set_visible(true)
circle.color = RED
circle.make_smaller()
circle.set_radius(5)
// or whatever. just saying we can do approximately this already today, in most any modern language, as long as you're willing to express it in the prog language rather than the natural language. And I'm not sure having it expressed in a natural language is better in any significant way.
This only works if someone has added such an interface to every object in the programming language, the user is familiar with the dot-calls-method convention (and the state-is-modified convention), etc. I think to do actual programming it's probably best to use an actual programming language, as you do want all the details under control. To do what most people do with mathematica, however, (and the way most people use mathematica is more like the way they use an interpreter than the way they write in a source file, by trying out all sorts of combinations of some little pieces while they work out the actual problem they're trying to solve in their heads) it seems like a good idea, as you're just removing friction from the system (what if circle.make_smaller() was named circle.reduce_size()? Is this responsibility better offshored to an intellisense-like technology with heavy autocompletion? But in general I don't want to be told what to type, I want what I type to work)
Yes. Now make this actually render a circle after each step. And provide pronouns (anaphora) like this, it and the radius (inferred noun in some syntax). My whole point was about a) smart objects that have prepopulated fields with default values, and b) anaphora. I don't have an opinion about the natural language at this point.
This is addressed in the article, and arguably the article's main point. Quoth:
"I have to say that something I thought would be a big issue is the vagueness of natural language. That one particular natural language input might equally well refer to many different precise programs.
"And I had imagined it would be a routine thing to have to generate test examples for the user in order to be able to choose between different possible programs.
"But in reality this seems to be quite rare: there is usually an “obvious” interpretation, that in typical Wolfram|Alpha style, one can put first—with the less obvious interpretations a click away."
> "Where is the red circle drawn? How large is it? What shade of red? How are those arbitrary values chosen, and how do I choose others?"
When those things matter, more information will be required in both natural language and a high level programming language. On the other hand, when none of that really matters a high level programming language still requires all those items to be specified.
Like any level of abstraction, there are tradeoffs. On the other hand to explain how to submit a reply, I don't say:
(The results for "bring me some delicious pho" are similarly unsatisfactory - it just tells me that delicious means "greatly pleasing or entertaining". Not news to me, pal!)
> "Draw a red circle" is enough to get a red circle.
Yes, but once you have to say "Draw a circle in this shade of red, give it a black border this thick, make it this big and put it at these coordinates" things are starting to get unwieldy. After a few different circles I'd probably start longing for draw_circle(fill_colour, radius, (x,y,z), border_colour, border_width).
Edit: Added function arguments to make the comparison less biased.
The problem with computer languages is that, if you want to do something new in a language you're just learning, you don't know if it's:
draw_circle(...)
circle_draw(...)
circle.draw(...)
Graphics::circle.draw(...)
shape_draw('circle',...)
or any of the million ways to ask the computer to draw a circle.
and you don't know if you need to do:
import graphics.package
#include <graphics.h>
use graphics.io
...
Just witness the myriad ways there are to tell the computer to print some text to standard out (echo, print, write, cout, ...), and the myriad ways to formulate a conditional or a for loop (e.g. see http://rosettacode.org/wiki/99_Bottles_of_Beer)
If the compiler/interpreter had at least some level of intelligence we could just say "draw a circle" or "output this text" and the compiler/interpreter would know which function to call, which libraries to include, and the exact syntax to use.
EDIT: Though, now that I think about it, this may be a great add-on to IDE's or text editors like Emacs, instead of having the compiler deal with it. Emacs knows which programming mode you are in, and you could just type 'M-x code: draw circle' and it inserts the appropriate code, depending on the language.
Exactly. Natural language will build more of the mechanism for you.
* "I set the brake up by connecting up rod and lever."--Yes, given the whole of the rest of the mechanism. Only in conjunction with that is it a brake-lever, and separated from its support it is not even a lever; it may be anything, or nothing."* -- Wittgenstein
I think that it's disingenuous to point out the many ways to call a function across half a dozen languages while completely ignoring how many ways there can be to say something just in English.
Think of playing a text-based adventure game and how frustrating it can be trying to work out the exact phrase the designers had in mind. To make this work you'd essentially need a machine that could converse with you to build the program - the way that an engineer talks to a client to draw up a specification - which would be very cool.
I like your idea for an editor add-on. Snippets taken one step further.
> '"Draw a circle in this shade of red, give it a black border this thick, make it this big and put it at these coordinates"'
Draw a 300 pixel DarkRed circle with a thin black border centered in the blue square.
Wolfram's point is that conventional languages won't get your circle to that location as easily, e.g. if the blue square is named arbitrarily and its color is bluish but not literally <color>blue</color>.
I'm not suggesting that high-level languages aren't useful, but the reason people often storyboard designs with felt-tips and tracing paper rather than Photoshop is to avoid interrupting the flow of thoughts with the task of translation.
The advantage of natural language over a high level programming language would appear to be analogous to that which a high level programming language has over assembly.
I think you may be conflating programming with software development. People still develop software in assembly language, but few people use it in lieu of javascript on the web.