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


当前回答

try {

} finally { // should never happen 

}

其他回答

// error codes
#define ERROR_SUCESS 0
#define ERROR_SUCCESS_IS_MISSPELLED 1

没有定义其他错误代码。

// 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
// Jay knows what's going on here, but will he remember in a year? Not very likely, this code sucks, but it works so do not change it.

这条评论被贴在一个巨大的“如果”区块上…哦,它操纵一个对象数组的对象数组的对象数组的字符串对象数组,可以是字符串或数字,取决于至少3个因素…(是的,我必须调试这段代码并更改它,我写了注释,但我没有写原始代码)。;)

我只是发表了这样的评论:

// this control (Resistance) is FUTILE! 

一段时间前我在一个PHP CMS中添加的注释。

if (/*you*/ $_GET['action']) { //celebrate