你遇到过的源代码中最好的注释是什么?


当前回答

Case 1:
   ...
   break;
   ...
//I don't want do do this but [my coworker] says it's part of the code standard
default:
   break;

其他回答

/* My lawyer told me not to reveal */
    #Christmas tree initializer  
    toConnect = []  
    toRead =   [  ]  
    toWrite = [    ]   
    primes = [      ]  
    responses = {}  
    remaining = {}  
// StupidCompilerDontInline(SCDI), in the test project where
// allcode was in a single cpp the compiler had inlined nearly
// everything which lead to nice stackoverflow.
// To prevent this the metods are made virtual
#define SCDI virtual

我没有亲身经历过这种情况,但这是一个很好的故事(详见我的评论中的解释):

#define MSGTAG_B33R     0x723 /* RIPLVB */

我告诉学员至少做一些异常处理。这是我在每一个db调用....返回

Catch (Exception e) {
    //eat it
}