[Edu-sig] Webster Van Robot
Andre Roberge
andre.roberge at gmail.com
Mon Sep 8 17:54:52 CEST 2008
On Mon, Sep 8, 2008 at 12:44 PM, kirby urner <kirby.urner at gmail.com> 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
>
More information about the Edu-sig
mailing list