First page Back Continue Last page Overview Graphics
Good vs. Bad Comments
Good:
pa a19 t 2b ; pos_exp := true
Not so good:
pa a19 t 2b ; /* kludge!!! set multiply address part to address of 10 */
Bad:
pa a19 t 2b ; // set address part of a19 to 2b
Notes:
So the comments were necessary not to explain what the code actually did, but rather what the code was intended to do. Comments are for expressing intentions. On this basis we can actually distinguish good and bad comments. The Rosetta code had good comments. Modern code all too frequently has not so good comments or bad comments. The bad comments simply repeat what the code is doing.