On Fri, Apr 23, 2010 at 17:12, Richard Kenner <ken...@vlsi1.ultra.nyu.edu> wrote: > I there's no substitute for proper comments.
Oh I agree! However, I proffer that the need to write a comment is often an indication for the need to write the code better (and to choose another programming language). > good code can't give the SPECIFICATIONS of a function... This may largely be a sign that the formal language is not expressive enough; in particular, the language should at least try to support abstraction formally (hence, binary < assembly < C < C++). Unfortunately, we still have a long way to go before our formal languages are capable enough to replace comments significantly. > Also, an important thing to put in comments is WHY something > is done the way it is and (more importantly) why it ISN'T done > another way. No amount of good quality code can contain that > information. Indeed!