[Newbies] Good commenting style?

Kannan Thambiah pygospa at web.de
Sat Jul 31 13:05:46 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Squeakers,

I've just been reading through the Laser Game Manual by Stephan B  
Wessels, and stumbled upon the section where he suggested a method for  
leaving notes, i.e. ToDos in the source code (http://squeak.preeminent.org/tut2007/html/035B.html 
).

He suggests to enhance the Object class with a new method "revisit:  
aString", that doesn't have a method body. Instead every subclass of  
Object where we want to leave notes, we'll just send us a message,  
e.g. "self revisit: 'I still need to think about a more effective  
algorithm here'".

The trick is that now you can search for all senders of "revisit:" and  
have all your ToDos in one place.

What do you think about this approach?



Personally I dislike it. Though it is an interesting approach I  
somehow feel like cheating on the purpose of methods and messages. I  
don't know how to put it into better words, it just doesn't feel like  
neat, clean object oriented programming to me.

What do you think? And, more important, how do you keep track of your  
ToDos? How do you keep them in your comments, and how do you make them  
available to yourself in an overview?

Greetings,
pygospa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.11 (Darwin)

iEYEARECAAYFAkxUH7sACgkQSspvMUAssY4ipQCcDtbuAA4ixx+15WKq+qc6y2Tg
lgIAn2VrWRaslTgv4mSgRSb9KICnlJnp
=eVRL
-----END PGP SIGNATURE-----


More information about the Beginners mailing list