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


当前回答

class Act //That's me!!!
{

}

其他回答

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

// TODO: Need some codemonkey to doc comment this class.
// Added because boss changed his mind : 20020111,20020501,20020820, ...
// Commented out because boss changed his mind : 20020201,20020614,20020908, ...

在ETL脚本之间的主要黑客RPG数据库和SQL Server一个。我大概有10到20次这样的评论……

当我还在路透社工作的时候,我们的一个feed处理人员发表了一条评论,让一些人认为万能的上帝在帮助我们……

// Jesus told me to skip to the end of the message here

后来我们发现有一个拉丁美洲的联系人叫耶稣(HeyZus)。

 // WARNING!!!
 // Very perversive code ahead!

... about a 20 lines of "very perversive" code ...

// Now you can call your grandmother back. ;)
v.bpc     := v.pc;  -- Remember to jump back
v.baccu   := accu;  -- Yo dawg, heard you like runing instructions
                    -- so I took backup of your accu so you can run
                    -- instructions while you run instructions.
v.flags.i := false; -- No more interupts