Comments

tim Rowledge tim at rowledge.org
Wed Sep 12 05:19:17 UTC 2007


On 11-Sep-07, at 9:57 PM, Jason Johnson wrote:

> It truly is annoying when you look at classes with no comments.
> Writers of classes need to remember that the next person looking at
> the code doesn't have the whole architecture in their head like you do
> so they may not know where to start.
And to repeat repeat myself again again, the original writer won't  
have it all in her head after a distraction.
Or a few weeks. Or a vacation.

>
> But "every method should" is an exaggeration, no?  I mean do you want
> a comment for every accessors saying "this is an accessors"?
Actually in general I *do* want a comment in accessors; not a simple  
minded one though. Y'see I don't *like* simple accessors. Instance  
variables are there for a reason and they're not publicly accessible  
for another reason.A method that opens up my object to rape and  
pillage damn well *should* be commented. A class where all the  
instvars have accessors is generally going to be horribly abused. I  
mean, what is this ? C++? Gimme a break. People will be trying to  
tell me that Squeak must have an "access path notation for variable  
members" next. If I'm supposed to be exposing my programmatic  
buttocks to the world I want a  comment to explain why!


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: CSF: Charge to NSF





More information about the Squeak-dev mailing list