On Mar 19, 5:01 pm, Doug Hoffman <no.spam> wrote:
>Andrew and others started down the path of using different
> primitives for line drawing. These primitives relieved some stack
> juggling. I objected to changing the primitives.
While turtle graphics can be implemented as primitives, it can also be
implemented on top of the LINE in the BOX example. So I don't see it
as changing primitives.
> Anyway. Bottom Line. *If* we are interested in attracting newbies to
> Forth, I maintain that BOX2 is going to be far more effective than
> DRAW-BOX.
It depends on whether we are interested in attracting newbies who
already have some experience with an Algol family computer language,
or at the very least a high comfort level with algebraic
manipulations, or not.
If not, clearly turtle graphics to draw directly on the screen, and
then learning how to program the turtle to make higher level figures,
is going to attract more newbies than BOX2.
I don't think there are not good examples where locals are a
benefit ... and implementing mathematical algorithms correctly would
rank right up there for me. But the line drawing example is a poorly
chosen one.
And if we do it, it should be a proper turtle, with a current location
and a spot that it is heading to. So its got two x-y pairs as state.


|