|
|
|
|
|
by Kev
5694 days 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. |
|
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.