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


当前回答

//Dear future me. Please forgive me. 
//I can't even begin to express how sorry I am.  

我今天刚发现了这个:

//private instance variable for storing age
public static int age;

其他回答

我刚刚完成了一个日志框架(使用Trace,为什么没有这样的存在我不知道)。我做了一个继承自TraceListener的方便基类。它覆盖了所有的TraceListener方法,并将它们路由到一个方法中——因此有很多文档注释:

// TODO: Need some codemonkey to doc comment this class.
#ifdef TRACE
#undef TRACE     /* All your trace are belong to us. */
#endif
#define TRACE ....
// If I from the future read this I'll back in time and kill myself. 
/* FIXME This must absolutely be removed before 4.0.7 release
 * TODO really remove this */

我们已经发布了4.0.7,4.0.8,4.0.9和4.1版本…

//Abandon all hope ye who enter beyond this point