5 ms·
While it would be neat to give the power of programming to everyone, I'm not convinced coding in a natural language would necessarily be better/easier than writ
by bradly 16y ago
While it would be neat to give the power of programming to everyone, I'm not convinced coding in a natural language would necessarily be better/easier than writing code in Ruby or Lisp or Python.
Sure, you eliminate the first big hurdle in programming, but learning the syntax of programming language is usually one of the easier parts of software development.
- brudgers 16y ago"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.
- Kev 16y ago> "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.
- brudgers 16y ago> '"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.
- sendos 16y agoThe 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 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.
- brudgers 16y agoExactly. 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
- Kev 16y agoI 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.
- necubi 16y agoWhere 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.
- brudgers 16y ago> "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: <form method="post" action="/r"> <input type="hidden" name="fnid" value="7YwrNY6bwe"/> <textarea name="text" rows="6" cols="60"/> <br/> <br/> <input type="submit" value="reply"/> </form> I say "press the button." edit: html example to fit natural language model.
- akkartik 16y agoDraw 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.
- ElbertF 16y agoThis reminds of me of QBASIC (oh the nostalgia): CLS SCREEN 12 CIRCLE (200, 300), 50, 4
- silentbicycle 16y agoMe too. I wonder what people who learned Lisp, Prolog, or APL when they were five would be capable of now!