Hacker News new | ask | show | jobs
by secret-noun 947 days ago
I felt like the naming was a little unintuitive here. `forward` and `left` seem to be directions of movement (especially if I want the painter to "move left"). Instead, `forward` means to draw/move, while `left` is a CCW rotation (even though it supports a negative argument)

  call paint.draw(10)
  call paint.rotate(90) // or even rotate("up")
speaks better to me.
1 comments

The LOGO terminology is an abbreviation of "move forward 10 steps, turn left 90 degrees", omitting "move"/"turn" and the units, as those are implied. LOGO uses a "turtle" as an avatar carrying out the instructions, like a little robot you program. See https://en.wikipedia.org/wiki/Turtle_graphics.

Python also comes with an implementation: https://docs.python.org/3/library/turtle.html

I agree that the paint prefix doesn’t quite match that conception.