5 ms·
> "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
by 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.