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


当前回答

//Mr. Compiler, please do not read this.

其他回答

#pragma region Crap that is kept for temporary reasons

    //  Huge chunk of commented code

#pragma endregion
public function get state( /* of Palestine back */ ):Boolean

我曾经在一个用Paradox 3.5 -编写的大型预算系统工作多年后接到一个客户的电话

“我们在调试中遇到了一些注释”-

// This shouldn't happen, if it does, then the bits that automagically 
// worked when I wrote it have stopped working

... !

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

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

// TODO: Need some codemonkey to doc comment this class.