On Mon, Sep 8, 2008 at 12:44 PM, kirby urner <[EMAIL PROTECTED]> wrote: >> For example, the following is a valid program: >> for some_variable in range(4): >> move() >> turn_left() >> move() >> build_wall_on_left() >> > > So no explicit target or receiver for the message, as the Smalltalk > people might say? I.e. you don't say myturtle.move() but just move(), > more like Logo? > That is correct. This is how Guido van Robot is [although it uses move and not move()], and how rur-ple is.
In rur-ple, one can later have reeborg = Robot() reeborg.move() reeborg.turn_left() etc., but it does start with simple functions and build from there. One can see move() as equivalent to reeborg.move(), but where the instantiation of the Robot class has happened behind the scene, i.e. reeborg = Robot() move = reeborg.move turn_left = reeborg.turn_left etc. My plans would be the same when integrated with Crunchy. I think (and Andy will be able to confirm/infirm based on his real life experience) that it is better to use a more gradual approach like this (i.e. hide the object-oriented construction at the beginning). André > Kirby > _______________________________________________ Edu-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/edu-sig
