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


当前回答

摘自UNIX版本6源代码,大约1975年:

/* You are not expected to understand this. */

其他回答

public int hashCode() {
//sucks, but what're you gonna do

/*
int hash = 7;
for (int i = 0; i < array.length; i++)
    hash = hash * 31 * (null == array[i] ? 0 : array[i].hashCode());
return hash;
*/

return 0;
}

不是一个评论,而是一个goto标签

ICantBelieveImUsingAGoto:
/* Please work */

在几年前编写Perl时,我在顶部和底部添加了这些注释:

# <magic type="voodoo">

...

# </magic>

下一个研究它的人在Perl中并不是那么热门,他花了一段时间搜索文档,看看“魔法”和“巫毒”是怎么做的。从那以后,我试着添加更多有用的评论……

(A bunch of code that's really weird looking)  //Kludge.