Class comments (was Re: ProtoObject?)

Stefan Matthias Aust sma at 3plus4.de
Tue Feb 8 23:05:53 UTC 2000


>>It's not documented in the "comment" for the class.

Unfortunately, too many classes don't have comments.  Is there anybody who
wants to step in an write and provide additional class comments?  In
exchange, I'd make sure that they get added as candidates for the update
stream.

However, we should first agree upon a common format.  Some (old) class
comments use "I" to refer to the class.  Other comments use "This class" or
use the class name "ProtoObject establishes".  I'd vote for the later two
variants.  The comment should be sort and should clearly describe the
classes purpose without going too much in detail.  For classes with
instance variables, I'd prefer if their purpose is also described by naming
the expected class and its purpose, for example

session - a HttpSession, the current session as decoded from the cookie

The class comment should not contain implementation details, comments,
development history or examples of usage.  The latter is better documented
in class methods called exampleX (X being a number) in a "examples"
category.  Additional documentation should be put into appropriate class
methods in a "documentation" protocol.


bye
--
Stefan Matthias Aust  //  Bevor wir fallen, fallen wir lieber auf.





More information about the Squeak-dev mailing list