Comments (was: Re: OrderedCollection new allButLast?)

Blake blake at kingdomrpg.com
Wed Sep 12 04:33:12 UTC 2007


I've always started with the documentation.

But I'm not a big code commenter. I try to set up a system with documented  
rules and then just document the exceptions, along with an over-arching  
class comment. (And, if God help me, I have to write something clever,  
I'll document the bejeezus out of it.) On the other hand, doing it  
robotically is of little use.

E.g., does this really help:

at: key
	"Answer the value associated with the key."
	^ self at: key ifAbsent: [self errorKeyNotFound]

? I mean, I should hope that's what it does.

But I don't disagree with what's being said. The problem is you very often  
have neither a cohesive system with documented rules, documented  
exceptions, nor class comments.

	===Blake===



More information about the Squeak-dev mailing list