Re:Learn to program Python using a Logo-like turtle
by dpritchett on Thursday April 28, 2011 @05:44PM
(#2495220)
I haven't finished SICP so I'm not sure which bit you're talking about, could you please point it out? http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html#...
All IO is inherently impure, right? At best you're going to be composing funtions out of smaller functions that implement your graphics desires.
How can you get around having e.g. a circle(radius, x-pos, y-pos, line-color, fill-color) function that draws per your specifications? There's no reason you couldn't implement that circle function using turtle...
What the world needs is an approachable version of a system like the image manipulation presented in Structure and Interpretation of Computer Programs, which takes a functional approach. (It may have only been in the first edition, but it is covered in the Hewlett-Packard videos.)
I'm not a functional programming absolutist, but experience has taught me to think functionally by default. The habit should be instilled in would-be programmers as early as possible.