"Vitaliy" wrote in message news:04d001c9276b$0099e780$6f02a8c0@ws11... > - Function and variable names rarely get out of date > - Good names eliminate the need for line-by-line comments > - You cannot "forget" or "put off until later" naming a function or a > variable > - It helps the programmer maintain code cohesion, by focusing their > attention on the purpose of the function > > This last point is very significant, IMHO. Comments are passive -- you use > them to describe what a function does, often after you've already written > it. A well chosen name actively shapes the implementation of a function. > If > a piece of code you're trying to put into the function does not agree with > the name, you know you should either change the name, or (which happens > more > often) put the code into another function. I've got to disagree here, at least when dealing with complex systems. Where I work, we typically use function comments to document pre and post conditions as well as argumets (in/out/out that needs free'd, etc.). If you don't do this sort of documentation, then you have to read through the whole function just to call it. That's absolutely silly when you're working on big projects with many developers spread across the globe. Jeff -- A clever person solves a problem. A wise person avoids it. -- Einstein -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist