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


当前回答

在初始化链表时:

last = first; /* Biblical reference */

简洁而滑稽。

其他回答

// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...

我刚刚注意到自己在写这个

// not brilliant solution, but fair enough heh.

高斯林的Emacs源代码中的ascii艺术头骨和交叉骨骼(这里很难重现)(警告说他编写的超热屏幕管理包不容易理解)。

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

// TODO: Need some codemonkey to doc comment this class.
/*************************** Drag And Drop Section - Start (you should be me to mess with this section)*********************************************/