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


当前回答

不记得我在哪里见过这些了

long time; /* know C */

and(在代码中创建某种UNIX守护进程):

/* Be a real daemon: fork myself and kill my parent */

其他回答

// (c) 2000 Applied Magic, Inc.
// Unauthorized use punishable by torture, mutilation, and vivisection.

啊,我一直很喜欢这个……

// this error could never happen

然后,客户打电话说他看到一条错误消息说"这个错误永远不会发生"

不是在代码中,而是在相关的bug跟踪系统中:

这不可能是我代码中的bug。我非常小心地编码。

// No women, no children... What movie???
Fix problem where Nulls don't work properly.  Stupid Microsoft!

代码以迂回的方式一行一行地将null转换为零长度的字符串,因为愚蠢的程序员不理解null是什么,也从未听说过Nz()函数。