You are not logged in.
Hello,
Many turtle operations (like "die") are declared as final. Such declaration can complicate further extensions of turtles.
For instance, MyTurtle, extending Turtle belongs to a group. When my turtle dies, I wish I can call "die" and have it removed from its group. As "die" is final, I cannot do that, and I have to call "myDie()" which performs desired operations and terminates by calling "die()". The programmer has now to take 2 levels of operations (one at the Turtle level one one at MyTurtle level), increasing the overall complexity of his software.
Is there a strong reason that forces Turtle operations to be final ?
Thank you
Offline
Hi,
There is no strong reason and it is indeed a programming mistake from us. I will correct that asap.
Many thanks for the feeback.
Offline