Back to the issue... (was RE: Squeak coding style...)

Lex Spoon lex at cc.gatech.edu
Thu Mar 4 02:35:21 UTC 2004


> Perhaps this should be expanded so that uncommented methods (perhaps 
> testing for more than a smallish number of bytecodes?) also have such a 
> comment automagically added? Since we have the writers initials 
> (normally) we could even make it be something like
> 

Interesting idea, but IMHO no.  I don't even quite agree that every
class needs a comment; if you see this class hierarchy:

	LambdaExpression
		LEVariable
		LEApplication
		LEAbstraction
		
Then it is utterly pointless to go through putting comments like "a
LEVariable is a lambda expression variable" and "a LEApplication is a
lambda expression application".  If you know what a lambda expression
then you don't want a comment in the subclasses.  The name suffices.  Or
how about this one:

	LargeInteger
		LargePositiveInteger
		LargeNegativeInteger
		
Sure, put a comment in LargeInteger to say what "large" means.  But a
comment would be useless in the two subclasses.

With methods it's even more frequently the case that a comment is a
wasted distraction and an unnecessary maintenance burden.  We really
don't need a lot of this kind of comment:

	sillify: aString
		"sillify the argument"


-Lex



More information about the Squeak-dev mailing list